CI down with the MySQL stored procedure, the connection must be freed to execute the other query again, but I made an error after releasing the connection here, the code is as follows:
Get node Information
Executing stored procedures
$query = $this->db->query ("Call Ws_node_one ($id)");
$data [' node '] = $query->result_array () [0];
$this->db->close ();//close connection
$this->load->database ();//optional, CI down with $this->db automatic connection
The following is a new query
$result = $this->db->get_where ("Ws_node", Array ("id" = + $pid));//That's the query.
#######################################
The error is as follows:
A PHP Error was encountered
severity:8192
Message:mysql_escape_string (): This function is deprecated; Use Mysql_real_escape_string () instead.
filename:mysqli/mysqli_driver.php
Line number:320
#############################################
The following query is the result, but this mysql_escape_string () character escape function call failed, do not know why, according to the request to mysqli/mysqli_driver.php Mysql_escape_ String changed to Mysql_real_escape_string, also the same, reported mysql_real_escape_string error.
##############################################
Great God solver!!!
Ci Xiao Bai
Reply to discussion (solution)
The MySQL extension must disconnect the database after the stored procedure is executed and reconnect before you can
So MySQL is behind, to be eliminated.
You can use MYSQLI or PDO extensions instead
After changing the report mysql_real_escape_string error. What's wrong with that report?
This is not the case, and a patchwork of SQL is problematic.
The MySQL extension must disconnect the database after the stored procedure is executed and reconnect before you can
So MySQL is behind, to be eliminated.
You can use MYSQLI or PDO extensions instead
I have this mysqli-driven, and I have $this->db->close (); Close the connection, re-open will report the error, but the query is results
After changing the report mysql_real_escape_string error. What's wrong with that report?
After changing the mysql_real_escape_string (), the newspaper:
A PHP Error was encountered
severity:8192
Message:mysql_real_escape_string (): This function is deprecated; Use Mysql_escape_string () instead.
filename:mysqli/mysqli_driver.php
Line number:320
This is not the case, and a patchwork of SQL is problematic.
Excuse me, what do you mean, no such query? How do you find it?
What is your PHP version?
What is your PHP version?
5.5
MySQL extension function has been deprecated since 5.5.0, use mysqli and PDO instead.
MySQL extension function has been deprecated since 5.5.0, use mysqli and PDO instead.
I have said above, my MySQL driver settings is mysqli, that is, all query functions are musqli, you seem to have not clear the problem ah ...
CSDN What slag forum, a little popular, there is no answer to the technical staff, what moderators are Dora Bar, alas ... I'm not coming to this post anymore.