AndrewJames wrote:

> is there a better way (hopefully simpler) to code this?
> 
> i want to get the user id of the logged in user to use in my next
> statement.
> 
> $q1 = sprintf("SELECT uid FROM users WHERE
> users.username='$username'");  

The only "improvement" I can see is:

$q1 = sprintf("SELECT uid FROM users WHERE users.username='%s'",
$username);  


/Per Jessen, Zürich


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to