Re: [php-list] MySql problems

2008-10-12 Thread Daniel Israel
On Oct 11, 2008, at 1:08 PM, chellieclk wrote: > Hi Everyone. I am having a bit of a mysterious error that I cannot > find a solution to. > I can manually assign a value to $uid and everything works. With a > var though, I keep > getting an error about mysql _query not having a valid resource

Re: [php-list] MySql problems

2008-10-11 Thread Patrick Bierans
> $sql = "SELECT u_name FROM members WHERE u_name = {$uid}"; in general this should be the correct way: $sql = "SELECT u_name FROM members WHERE u_name = ".$uid; if you are paranoid you should go for typecasting: $sql = "SELECT u_name FROM members WHERE u_name = ".(int)$uid; if you are paranoid

[php-list] MySql problems

2008-10-11 Thread chellieclk
Hi Everyone. I am having a bit of a mysterious error that I cannot find a solution to. I can manually assign a value to $uid and everything works. With a var though, I keep getting an error about mysql _query not having a valid resource. I cannot get variables to work in my sql statements; I ha