NYCPHP Meetup

NYPHP.org

[nycphp-talk] PHP Error - Need Help Debugging

IAlsoAgree at stny.rr.com IAlsoAgree at stny.rr.com
Wed Apr 12 21:07:03 EDT 2006


Actually, I have no problems with using double quotes on the command
line (and in PHP scripts) with MySQL. In addition, that would not return
a PHP Parse error, it would return a MySQL error from the database (the
code would actually run, a line from the database citing the error would
be inserted in the middle of my HTML).

----- Original Message -----
From: Warren Myers <volcimaster at gmail.com>
Date: Wednesday, April 12, 2006 8:58 pm
Subject: Re: [nycphp-talk] PHP Error - Need Help Debugging
To: NYPHP Talk <talk at lists.nyphp.org>

> Doesn't SQl normally require single quotes aroung string 
> comparison? like
> this:
> 
> $q = "select * from sometable where column='$_GET['jerry']'"
> 
> 
> Warren
> 
> 
> On 4/12/06, IAlsoAgree at stny.rr.com <IAlsoAgree at stny.rr.com> wrote:
> >
> > I'm sure it's going to be something really obvious, but for now I 
> just> can't seem to figure out what it is.
> >
> > I'm getting the following error:
> > Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
> >
> > The line of code is:
> > $checkreplies = "SELECT posts.postid, posts.subject, posts.body,
> > posts.created, users.userid, users.username, users.aim, 
> users.created,> users.admin FROM posts, users WHERE posts.postid = 
> \"$_GET[id]\" AND
> > posts.userid = users.userid AND posts.replyto = $_GET[postid] LIMIT
> > ".($pagecount-1)*10-1.", 10";
> >
> > >From what I can gather, it sounds like I misused a double quote or
> > misplaced a peroid. But looking at the code, I can't see where I did
> > either wrong.
> >
> > Anyhelp would be appreciated.
> >
> > Thanks,
> > -Joe
> > _______________________________________________
> > New York PHP Community Talk Mailing List
> > http://lists.nyphp.org/mailman/listinfo/talk
> > New York PHP Conference and Expo 2006
> > http://www.nyphpcon.com
> > Show Your Participation in New York PHP
> > http://www.nyphp.org/show_participation.php
> >
> 
> 
> 
> --
> http://warrenmyers.com
> "God may not play dice with the universe, but something strange is 
> going on
> with the prime numbers." --Paul Erd?s
> "It's not possible. We are the type of people who have everything 
> in our
> favor going against us." --Ben Jarhvi, Short Circuit 2
> 



More information about the talk mailing list