Single quotes within the select work fine.
$login = mysql_query("SELECT * FROM Users WHERE Username = '$User_Name'");
On Thu, 11 Jul 2002 06:47:54 +1200, Shiloh Madsen wrote:
> Yet another thing i need some quick help with. What is the proper way to
> generate a select string in php. I know if youre trying to select a
> value from a column you need to enclose it in double quotes if youre
> doing it directly in sql. in this case the value in question is being
> passed as a variable from a previous page. i have the current line for
> selection in my page, but i dont think it is correct. any help?
>
> $login = mysql_query("SELECT * FROM Users WHERE Username =". $User_Name)
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php