Thread: SQL Query??
View Single Post
Old 11-21-2007, 10:21 AM   #3 (permalink)
Tanax
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default

Okey!
Thanks.

One more question, would this be a better query?
php Code:
$sql = sprintf("    SELECT
                                    `"
.$this->db->col['user_id']."`
                                FROM
                                    `"
.$this->db->table['users']."`
                                WHERE
                                    ((`"
.$this->db->col['user_name']."` = '%s') && (`".$this->db->col['user_pass']."` = '%s'))
                                LIMIT 1"
,
                                   
                                $user_name,
                                md5($user_pass));
Tanax is offline  
Reply With Quote