id is the primary key for the table.  If I add echo ($id); before the query
it echos a 15, which is correct.  Well, it's the right id for the test
person I'm logged into the site as anyway.  I'm missing something here :)


"Augusto Cesar Castoldi" <[EMAIL PROTECTED]> wrote in message
Pine.A41.4.32.0104151924060.11846-100000@marte">news:Pine.A41.4.32.0104151924060.11846-100000@marte...
> What do you have in the id variable?
>
> It's contents can be the problem.
>
> regards,
>
> Augusto Cesar Castoldi
>
> On Sun, 15 Apr 2001, Scott VanCaster wrote:
>
> > 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: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to