[nycphp-talk] PHP Error - Need Help Debugging
IAlsoAgree at stny.rr.com
IAlsoAgree at stny.rr.com
Wed Apr 12 21:49:24 EDT 2006
Actually, after I had given it a look I was begining to think that too.
The 1 looked off right next to the peroid.
Thanks for confirming that for me Andy.
-Joe
----- Original Message -----
From: Andy Dirnberger <dirn at dirnonline.com>
Date: Wednesday, April 12, 2006 9:39 pm
Subject: Re: [nycphp-talk] PHP Error - Need Help Debugging
To: 'NYPHP Talk' <talk at lists.nyphp.org>
> To get your original code to work, the ($pagecount-1)*10-1
> expression needs
> to be in parentheses: (($pagecount-1)*10-1)
>
> DiRN
>
> -----Original Message-----
> From: talk-bounces at lists.nyphp.org [mailto:talk-
> bounces at lists.nyphp.org] On
> Behalf Of IAlsoAgree at stny.rr.com
> Sent: Wednesday, April 12, 2006 9:22 PM
> To: NYPHP Talk
> Subject: Re: [nycphp-talk] PHP Error - Need Help Debugging
>
> Adding your $start line fixed the problem.
>
> Once again, MySQL has no problem with double or single quotes. You can
> use them interchangably. I've done this both via PHP and on the
> commandline and never had any problems with it.
>
> I still don't understand what I had done wrong in my previous code.
> Whatthere would have returned that error, any ideas?
>
> Thanks,
> -Joe
>
> ----- Original Message -----
> From: edward potter <edwardpotter at gmail.com>
> Date: Wednesday, April 12, 2006 9:16 pm
> Subject: Re: [nycphp-talk] PHP Error - Need Help Debugging
> To: NYPHP Talk <talk at lists.nyphp.org>
>
> > I don't think I've every used double quotes in sql, and why not
> covert> this to a variable value ahead of time? Looks a bit scarry.
> And then
> > just stick that in. At least it makes it a bit easier to debug, and
> > more readable.
> >
> > $id = $_GET[id];
> > $start = (($pagecount-1)*10)-1;
> >
> > etc.
> >
> > -ed :-)
> >
> > 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
> > >
> > _______________________________________________
> > 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
> >
> _______________________________________________
> 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
>
> _______________________________________________
> 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
>
More information about the talk
mailing list