我想将下面的 MySQL 查询更改为 MySQLi(prepared statements),但我不知道该怎么做,因为它有多行可供选择。谁能指出我正确的方法。
$check_added_files = mysql_query("select * from `vpb_uploads` where `username` = '".mysql_real_escape_string($username)."' and `firstname` = '' and `image_one` != '' and `image_two` != '' and `image_three` != '' and `image_four` != '' and `image_five` != ''");
if(mysql_num_rows($check_added_files) == 1)
{
echo 'up_to_five_already';
}