Jump to content

Warning: mysqli_real_escape_string() expects exactly 2 parameters, 1 given


IGCAssassin

Recommended Posts

Pls help not sure how to fix: I put the 410 just to mark the line in question Thanks In Advance

 

    function sql_escapestring($string)

    {

        return $this->sql_addq($string);

    }

    function sql_addq($string)

    {

        static $magic_quotes;

        if (!isset($magic_quotes)) $magic_quotes = get_magic_quotes_gpc();

        if ($magic_quotes) $string = stripslashes($string);

410  return (version_compare(phpversion(), '4.3.0', '>=')) ? mysqli_real_escape_string($string) : mysqli_escape_string($string);

 

    }

    function sql_error($query_id = 0)

    {

        return array('message' => @mysqli_error($this->db_connect_id), 'code' => @mysqli_errno($this->db_connect_id));

    }

    function sql_ufetchrow($query = "", $type=SQL_BOTH)

    {

        $query_id = $this->sql_query($query, true);

        $result = $this->sql_fetchrow($query_id, $type);

        $this->sql_freeresult($query_id);

        return $result;

mysqli_real_escape_string($string) ...

 

 

this needs to have 2 params the other parameter is your database connection so something like this

 

mysqli_real_escape_string($dbc, $string)

 

This is presuming your connection information is stored in a variable called $dbc

yer thats the line you are looking for.

 

i could do with seeing more of your code but this could work i think if its in the right place

 

mysqli_real_escape_string($this->db_connect_id, $string)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.