Hmm... thanks to all who helped. It was a spelling error. How embarrasing.

Thanks again.

Matt

> ----------
> From:         [EMAIL PROTECTED][SMTP:[EMAIL PROTECTED]]
> Sent:         14 May 2001 01:59
> To:   M.G. Devney C9803057; [EMAIL PROTECTED]
> Subject:      Re: MySQL-php UPDATE errors
> 
> Hi~ Everybody~^^
> 
> This problem is occured incorrect of SQL statment, I think.
> 
> First, $saveQuery's value is printed and from printed value, check if SQL
> statement is right.
> 
> and if SQL statement is right, check part of Database Connection etc..
> 
> Have a nice day~
> ----- Original Message -----
> From: "M.G. Devney C9803057" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, May 13, 2001 4:34 PM
> Subject: MySQL-php UPDATE errors
> 
> 
> > 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
> 

---------------------------------------------------------------------
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