I am authenticating users using the mysql or mysqli password() function in a SELECT query. i.e.
select * from users where u_name='$username' and u_pword = password('$password');
I want to convert this to a prepared statement with parameters. How do I handle the password()
function in a prepared statement? Does the password() function go in the prepared statement, e.g. password(?) or the in the parameters as e.g. password($var).
I have seen a similar here problem before ( Convert from mysqli_query to mysqli prepared statement using mysql PASSWORD function ) but it has remained unanswered.
It must be a common issue, perhaps it is time to raise it again. Is anybody able to help?