我有两个来自 MYSQL 的结果...
$table = $db->getPrefix().'content';
$query = mysql_query("SELECT catid FROM $table WHERE id = $id");
$result = mysql_fetch_assoc($query);
$catId = $result['catid'];
和...
$table_2 = $db->getPrefix().'categories';
$query_2 = mysql_query("SELECT id FROM $table_2 WHERE parent_id = 11");
while($result_2 = mysql_fetch_array($query_2)){
echo implode(',',$result_2);
}
我需要这样的if ...
if($catId = $result_2){
...
}
我该如何解决?