[PHP] Session migration problem...

2003-10-20 Thread Jake McHenry
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,

Re: [PHP] Session migration problem...

2003-10-20 Thread Chris Shiflett
--- 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, you might

RE: [PHP] Session migration problem...

2003-10-20 Thread Jake McHenry
-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: $result = mysql_query(SELECT * FROM `users

RE: [PHP] Session migration problem...

2003-10-20 Thread Jake McHenry
-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: $result = mysql_query(SELECT * FROM `users

RE: [PHP] Session migration problem...

2003-10-20 Thread Jake McHenry
-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:[EMAIL PROTECTED] Sent: Monday, October 20

RE: [PHP] Session migration problem...

2003-10-20 Thread Chris Shiflett
--- 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` =

Re: [PHP] Session migration problem...

2003-10-20 Thread Curt Zirzow
* 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'].'); select * from users where

RE: [PHP] Session migration problem...

2003-10-20 Thread Chris Shiflett
--- 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, and

Re: [PHP] Session migration problem...

2003-10-20 Thread Curt Zirzow
* 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. Personally, I find