What i want is to write this code with prepared statement:
if (mysqli_num_rows(mysqli_query($link,"select name from accounts where name='$username'"))==1)
{
// some actions
}
Well, how to do that?
I know how to make a prepared "INSERT INTO"
statement because I don't need to get the mysqli_query
result into a php variable, but how to save a "SELECT"
prepare statement to run mysqli_num_rows($result)
right after?
EDIT: What I want to do is to execute a mysqli_query() with prepared statements while saving the result into a php $result variable. how to do that?