Hi guys,

Hope you can help. I'll give you the source code for my
"overwriteProduct.php3" first I think:

<?php
        if (count($DBHOST)==0)
include("/home/stud/yrf/bsccs4/c9803057/phpincludes/dbFunctions.php3");
        $dbcnx = myConnect();
        
        echo "1";
        
        while (list ($key, $value) = each ($PROD_PRICE))
                {                       
                echo "3";
                $saveQuery = "UPDATE $table_product SET PROD_PRICE =
\"$value\" WHERE PROD_ID = \"$key\"";
                $result=mysql_query($saveQuery);
                echo "4";
                if (! $result) printf ("Error: %s<br>", mysql_error ());
        };
?>

This gives the following errors when I run the thing:

134Error: You have an error in your SQL syntax near 'SET PROD_PRICE = "222"
WHERE PROD_ID = "1"' at line 1
34Error: You have an error in your SQL syntax near 'SET PROD_PRICE = "444"
WHERE PROD_ID = "2"' at line 1
34Error: You have an error in your SQL syntax near 'SET PROD_PRICE = "789"
WHERE PROD_ID = "3"' at line 1
34Error: You have an error in your SQL syntax near 'SET PROD_PRICE = "321"
WHERE PROD_ID = "4"' at line 1


The numbers I'm setting the column/row combos to are spot on ($value & $key
are fine). Anyone got an idea why it's not working?

Thanks in advance.

Matt Devney
work: [EMAIL PROTECTED]
home: [EMAIL PROTECTED]

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to