嘿,我有以下代码:
$query = "SELECT * " .
"FROM wp_postmeta " .
"WHERE post_id = " . $postID . " " .
"AND meta_key = 'xTraData';";
$result = mysql_query($query);
echo $result;
echo ' ' . $postID;
if($result >= 1){
我返回了$result的Resource id #2 ....
没有行。运行查询SELECT * FROM wp_postmeta WHERE post_id = 1792 AND meta_key = 'xTraData'时,它全部为空;
我确保$postID返回1792并且确实如此。
我在想它会返回一个0或1 ...