Welcome Guest, Not a member yet? Register   Sign In
Database Error: 2014
#1

Yes, it is related to MySQL.... i am trying to bring a library used in an app written using classic PHP. There is a search script that runs two queries at times, based on request. In that case the error comes up.

We never had a problem with the library before but then it was on a PDO envrionment. I am not very familiar with CI to go on change it to be PDO compatible right now nor have time.

I tried freeing the first result set by $query->free_result();.

The codes call stored procuederss:

PHP Code:
$result=$this->CI->db->query('CALL Spec()');

    if(
$result->num_rows()>0){
    
$row=$result->row();
     
$totalRecord=$row->total;
    
        
               } 
             
    else {
//no result.
    
die("quit");

    
    }
//no result or error

//FREE RESULT

$result->free_result(); 

If it continues, then a similar query but SELECT field...in nature is expected to run but it just stops with error 2014. Where am I supposed to free the query?
Reply
#2

(This post was last modified: 03-29-2017, 06:08 PM by raknjak.)

for PDO you have to enter a dsn in config/database.php.
And/or using php-mysqlnd seems to help.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB