
February 14th, 2007, 11:33 AM
|
|
Registered User
|
|
Join Date: Apr 2007
Posts: 22,309
Time spent in forums: < 1 sec
Reputation Power: 24
|
|
|
MDB2 & mysql escape string ?
Hello everybody, thank you for letting me post onto your forums. This is my first project with PEAR & MDB2.
I don't really understand how to secure a variable to use within a database query string, like with mysql_real_escape_string.
Would the following code be considered as sane please ?
$res_username_password = $objMDB2->query('SELECT `iUserID`, `sPassword` FROM `users` WHERE `sName` = '.$objMDB2->quote($_POST['s_password'], 'text'));
Thank you in advance for your help 
|