我有如下查询:
$sql = "SELECT * FROM member_details WHERE blood_group = 'O+'";
如果我将在 phpmyadmin 中执行此查询,那么我将得到零行。但是当我回显数组时,我会变得像下面这样。
$n = new data();
$res = $n -> querySend($sql);
$abc = mysql_fetch_array($res);
//if i do like this
echo $res; // output getting as Resource id#6
//if i do like this then
echo count($abc); // output getting as 1
//if i do like this then
print_r($abc); die; // output getting as blank
我想检查是否$abc
为空。但由于上述输出,我无法检查它。谁能告诉我这个有什么问题。提前致谢。