Query doesn't work inside a function

前端 未结 5 924
一生所求
一生所求 2021-01-25 09:27

Well, I have this function in a custom script for SMF:

$query = \"SELECT id_member, real_name, id_group FROM smf_members WHERE id_group > 0 AND id_group != 9          


        
5条回答
  •  粉色の甜心
    2021-01-25 09:57

    your query

    function Display($member_id){
    $queryDisplay = "SELECT value FROM smf_themes WHERE id_member = ".$member_id." AND variable = 'cust_realfi'";
    }
    

    right query

        function Display($member_id){
        $queryDisplay = mysql_query("SELECT value FROM smf_themes WHERE id_member = '$member_id' AND variable = 'cust_realfi'");
        while ($row = mysql_fetch_array($queryDisplay));
        return $row['value'];
        }
    

提交回复
热议问题