我有个问题。我想将函数的值作为 mysql 结果返回
function Gets_comments_array_from_db($type, $thread_comment_id) {
# Sets variable for Query
$The_TYPE = $type;
$Thread = mysql_real_escape_string(intval($thread_comment_id));
# return array query for Further working
return mysql_query("SELECT * FROM `site_comments` WHERE `type`='".$The_TYPE."' AND `thread_comment_id`='".$Thread."'");
}
和
while($comment = mysql_fetch_array(Gets_comments_array_from_db('news', $id)){
echo '11';
}
谢谢!:)