RE: [PHP] SQL Query syntax error... Help?
| From: | Chris Cocuzzo | Date: | Sun, 15 Apr 2001 22:04:02 +0000 |
| Subject: | RE: [PHP] SQL Query syntax error... Help? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-48660@lists.php.net to get a copy of this message | ||
NEVERMIND! :)
-----Original Message-----
From: Scott VanCaster [mailto:scott@vancaster.net]
Sent: Sunday, April 15, 2001 6:05 PM
To: php-general@lists.php.net
Subject: Re: [PHP] SQL Query syntax error... Help?
Nevermind everyone, I'm an idiot :)
I had the case wrong. I needed $ID, not $id !!!!!
Thanks for the assistance though. Nice to know ya'll are here.
Scott
""Scott VanCaster"" <scott@vancaster.net> wrote in message
news:9bd394$ikn$1@toye.p.sourceforge.net...
> I've only been trying to learn this stuff for a few days and thought I was
> on a roll, but now have run into a problem I don't get at all. In my
script
> I have the following sql query and am receiving the following error when
it
> executes "You have an error in your SQL syntax near '' at line 1."
>
> Any idea what my problem is? I removed the WHERE id=$id and it works, but
> updates every record of course :(
>
> I'm lost here. Thanks for any help.
>
> $sql ="UPDATE members SET ".
> "name='$name', ".
> "email='$email', ".
> "icq='$icq', ".
> "password='$password', ".
> "loginid='$loginid', ".
> "countryid='$countryid', ".
> "gtlogin='$gtlogin', ".
> "gtpass='$gtpass', ".
> "swirvelogin='$swirvelogin', ".
> "swirvepass='$swirvepass' ".
> "WHERE id=$id" ;
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net