返回空结果

时间:2018-03-31 15:03:13

标签: php mysql database

我有以下功能:

public function get_interesses() {
    global $db;
    $interesses = array();
    $get_interesses = $db->query(sprintf("SELECT * FROM inter_list LEFT JOIN inter_user_conn ON inter_list.idinter = inter_user_conn.idinter AND inter_user_conn.iduser=%s WHERE inter_user_conn.idinter IS NULL", secure($this->_data['user_id'], 'int') )) or _error(SQL_ERROR_THROWEN);
    if($get_interesses->num_rows > 0) {
        while($interesse = $get_interesses->fetch_assoc()) {
            $interesses[] = $interesse;
        }
    } 
    return $interesses;
}

它工作正常,但我想回应" idinter" " inter_list"的值表,并返回空结果。 我可以回显除了" idinter"之外的所有表值,我需要该值。

Inter List表:

Inter List table

inter_user_conn:

inter_user_conn

0 个答案:

没有答案