* Thus wrote Chris Shiflett ([EMAIL PROTECTED]):
> --- Jake McHenry <[EMAIL PROTECTED]> wrote:
> > Is there any advantage to the curly brackets over the '".."'?
>
> There's not enough difference between the two to choose one over the other
> based on performance, if that's what you mean. Personall
--- Jake McHenry <[EMAIL PROTECTED]> wrote:
> Is there any advantage to the curly brackets over the '".."'?
There's not enough difference between the two to choose one over the other
based on performance, if that's what you mean. Personally, I find that
concatenation looks clearer in some cases, a
* Thus wrote Jake McHenry ([EMAIL PROTECTED]):
> > -Original Message-
> > From: Chris Shiflett [mailto:[EMAIL PROTECTED]
> >
> > --- Jake McHenry <[EMAIL PROTECTED]> wrote:
> > > $result = mysql_query("SELECT * FROM `users` WHERE `uname` =
> > > '".$_POST['username']."'");
> >
> > "se
--- Jake McHenry <[EMAIL PROTECTED]> wrote:
> I took the single quotes off of the field name, uname, but still
> getting the same error at the same line in the file...
>
> Any other suggestions?
Sure.
Let's look at your original code:
$result = mysql_query("SELECT * FROM `users` WHERE `uname` =
> -Original Message-
> From: Jake McHenry [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 20, 2003 10:32 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP] Session migration problem...
>
>
> > -Original Message-
> > From: Chris Shiflett [mailto:[
> -Original Message-
> From: Chris Shiflett [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 20, 2003 9:56 PM
> To: Jake McHenry; [EMAIL PROTECTED]
> Subject: Re: [PHP] Session migration problem...
>
>
> --- Jake McHenry <[EMAIL PROTECTED]> wrote:
>
> -Original Message-
> From: Chris Shiflett [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 20, 2003 9:56 PM
> To: Jake McHenry; [EMAIL PROTECTED]
> Subject: Re: [PHP] Session migration problem...
>
>
> --- Jake McHenry <[EMAIL PROTECTED]> wrote:
>
--- Jake McHenry <[EMAIL PROTECTED]> wrote:
> $result = mysql_query("SELECT * FROM `users` WHERE `uname` =
> '".$_POST['username']."'");
Don't put uname in single quotes. Aside from that, don't forget that you can
interpolate variables with curly braces. Depending on your personal preference,
yo
During my conversion to use sessions, and turning register globals
off, I've run into this problem.. So far the first and only...
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
result resource in /var/www/html/web/timesheetsessions/index.php on
line 26
Here are lines 25, an
9 matches
Mail list logo