Welcome Guest, Not a member yet? Register   Sign In
What is mysqli connection id?
#1

[eluser]chengfeng[/eluser]
Hi! I just test CI using mysqli. I already change dbdriver to mysqli. when i use mysqli_query, error occur.
Message: mysqli_query() expects at least 2 parameters, 1 given
In the my model code is:
Code:
class MGeneral extends Model
{
    function MGeneral()
    {
        parent::Model();
    }
    function getRecord()
    {
        $query="SELECT * FROM mysqlidb WHERE ID=1";
        $result=mysqli_query($query);
        return mysqli_fetch_array($result);        
    }
}
I think the error occur cause of no have mysqli connection ID. Could you tell me how to put the connection ID into mysqli_query method?
Code:
mysqli_query(???????,$query);


Messages In This Thread
What is mysqli connection id? - by El Forum - 07-11-2010, 09:24 PM
What is mysqli connection id? - by El Forum - 07-12-2010, 12:17 AM
What is mysqli connection id? - by El Forum - 07-12-2010, 10:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB