Fw: [PHP] Parse Error
| From: | Bob Eldred | Date: | Thu, 19 Feb 2004 06:41:05 +0000 |
| Subject: | Fw: [PHP] Parse Error | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-178218@lists.php.net to get a copy of this message | ||
Since I replied only to Edwin.
----- Original Message -----
From: "Bob Eldred" <bobathome@aqfl.com>
To: <copperwa11s@yahoo.co.jp>
Sent: Wednesday, February 18, 2004 10:40 PM
Subject: Re: [PHP] Parse Error
> Yes. Of course not. That wasn't the point. The point was that the
> parse error isn't caused by the lack of single quotes.
>
> Were everything else right in the script, that query would be just
fine.
>
> ----- Original Message -----
> From: "- Edwin -" <copperwa11s@yahoo.co.jp>
> To: "Bob Eldred" <bobathome@aqfl.com>
> Cc: <php-general@lists.php.net>
> Sent: Wednesday, February 18, 2004 10:04 PM
> Subject: Re: [PHP] Parse Error
>
>
> > On Wed, 18 Feb 2004 21:35:15 -0800
> > "Bob Eldred" <bobathome@aqfl.com> wrote:
> >
> > > > The error is:
> > > > Parse error: parse error, unexpected T_VARIABLE in
> > > > /www/htdocs/rolfvand/thinkquest/browsercheck.php on line 46
> > > > [/snip]
> > > >
> > > > All of your values are not enclosed with single quotes - the
> > > > first
> > > four
> > > > are, last four aren't
> > >
> > > That's almost definitely not the issue. Worst case scenario
> > > with the non-existent quotes is that MySQL will put bad
> > > information into the database if it's expecting numbers there
> > > and gets a string, or the query will fail if it's a string with
> > > whitespace. It ought to parse just fine.
> >
> > ??
> >
> > Your query wouldn't even be executed if you have a "parse error"
> > on your script. (So, it's not even possible for MySQL to "put bad
> > information into the database"...) Single quotes, double quotes,
> > semi-colon ought to be checked if one has "Parse error: parse
> > error, unexpected T_VARIABLE in blah blah blah"...
> >
> > ...[snip]...
> >
> > --
> >
> > - E -
> >
> >
>