Re: [PHP] Usng Session Vaiable in WHERE Statement

2004-07-26 Thread Jonathan Haddad
Remember you can always use curly braces.. "SELECT * from MembersData WHERE UserID = '{$_SESSION['logname']}'" works just fine Jonathan Haddad Afan Pasalic wrote: I think he has to keep the single quotes and add double quotes with dots: $MembersDataQry = "SELECT * FROM MembersData WHERE UserID=' "

Re: [PHP] Usng Session Vaiable in WHERE Statement

2004-07-26 Thread Afan Pasalic
I think he has to keep the single quotes and add double quotes with dots: $MembersDataQry = "SELECT * FROM MembersData WHERE UserID=' ".$_SESSION['logname']'." ' "; afan At 09:24 AM 7/26/2004, Jason Davidson wrote: hey, just take the single quotes around the word logname out and you should be ok.

Re: [PHP] Usng Session Vaiable in WHERE Statement

2004-07-26 Thread Jason Davidson
hey, just take the single quotes around the word logname out and you should be ok. Jason On Mon, 26 Jul 2004 12:58:28 +0100, Harlequin <[EMAIL PROTECTED]> wrote: > Could someone please help me with my syntax here...? > > $MembersDataQry = "SELECT * FROM MembersData > WHERE UserID='$_SESSION['log

Re: [PHP] Usng Session Vaiable in WHERE Statement

2004-07-26 Thread Chris Hayes
At 13:58 26-7-04, you wrote: Could someone please help me with my syntax here...? $MembersDataQry = "SELECT * FROM MembersData WHERE UserID='$_SESSION['logname']'"; I get an error on line 2 but can't seem to figure out what I've missed. 1. You have errors with the ' quote: you use it to wrap the en

[PHP] Usng Session Vaiable in WHERE Statement

2004-07-26 Thread Harlequin
Could someone please help me with my syntax here...? $MembersDataQry = "SELECT * FROM MembersData WHERE UserID='$_SESSION['logname']'"; I get an error on line 2 but can't seem to figure out what I've missed. The variable echoes fine so I know there's a string in there. -- -