好的,所以如果有人有图片,我有 sql 和输出,如果用户没有上传个人资料图片,我将如何重写它以设置默认图片?
$search = mysql_query("SELECT users.username, users.id, tbl_image.photo, tbl_image.userid FROM users LEFT OUTER JOIN tbl_image ON users.id=tbl_image.userid WHERE users.username LIKE '%$search_term%' and users.business <> 'business'");
<img src="/image/'.$results_row['photo'].'" width="50px" height="40px">