intrigue Posted November 6, 2006 Share Posted November 6, 2006 I want to secure myself and would like to know how to do parameterized queries can anyone explain it?Google doesn't help in my search hahaThanksmatt Link to comment https://forums.phpfreaks.com/topic/26317-parameterize-queries-can-anyone-help/ Share on other sites More sharing options...
trq Posted November 6, 2006 Share Posted November 6, 2006 [quote]can anyone explain it?[/quote]Can you? Im sorry, but Im not sure what you meen. Link to comment https://forums.phpfreaks.com/topic/26317-parameterize-queries-can-anyone-help/#findComment-120331 Share on other sites More sharing options...
intrigue Posted November 6, 2006 Author Share Posted November 6, 2006 [code] $result = db_query("SELECT id FROM ct_clients WHERE account = '?' AND password = '?';", $account, $password);[/code]Thats an example of a parameterized query.But i don't understand it so i can't implement it. Do they work with Insert queries or just Select? Any info is appreciated.matt Link to comment https://forums.phpfreaks.com/topic/26317-parameterize-queries-can-anyone-help/#findComment-120333 Share on other sites More sharing options...
trq Posted November 6, 2006 Share Posted November 6, 2006 They are [i]prepared[/i] statements. What database client are you using? At least you would need to be using the mysqli extension. Take a look at [url=http://au3.php.net/manual/en/function.mysqli-stmt-prepare.php]mysqli_stmt_prepare[/url](). Link to comment https://forums.phpfreaks.com/topic/26317-parameterize-queries-can-anyone-help/#findComment-120335 Share on other sites More sharing options...
intrigue Posted November 6, 2006 Author Share Posted November 6, 2006 i am using mySQL and i don't think thats the function i should be using, its how to protect against SQL injection attacks everyone says use parameterized queries but no examples or tutorialsmatt Link to comment https://forums.phpfreaks.com/topic/26317-parameterize-queries-can-anyone-help/#findComment-120346 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.