MySQL vs MySQLi

126 views
Skip to first unread message

Meizhen Hung

unread,
Feb 16, 2015, 11:51:42 PM2/16/15
to easy-app...@googlegroups.com
Hi,
I got error message of 
Severity: 8192  --> mysql_pconnect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead ...../system/database/drivers/mysql/mysql_driver.php 91

Then I switched to mysqli
But I have trouble with converting  mysql_real_escape_string() for I don't know how to pass connection object as a parameter  to backend_api.php
The error 
 Severity: Warning  --> mysqli_real_escape_string() expects exactly 2 parameters, 1 given ......./application/controllers/backend_api.php 746

Thanks

Meizhen Hung

unread,
Feb 17, 2015, 1:21:40 AM2/17/15
to easy-app...@googlegroups.com
Or How do I call the method from mysqli_driver.php,  function escape_str($str, $like = FALSE) from backend_api.php

Thanks

Meizhen Hung

unread,
Feb 17, 2015, 11:28:17 AM2/17/15
to easy-app...@googlegroups.com
Found out the solution from latest code v1.1   $this->db->escape_str()

Alex Tselegidis

unread,
Feb 18, 2015, 1:23:39 PM2/18/15
to easy-app...@googlegroups.com
Hi, would be better to update the codeigniter system folder to latest versio.

Alex Tselegidis

unread,
Feb 18, 2015, 1:23:39 PM2/18/15
to easy-app...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages