CodeIgniter Forums

Full Version: An Error Was Encountered (db)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

I get this error
Quote:An Error Was Encountered
Error Number:

ERROR: argument of WHERE must be type boolean, not type integer

SELECT user_jm_id FROM jm_resume WHERE jm_resume_id

from the function
function find_user_jm_id($jm_resume_id)
    $this->db->where('jm_resume_id', $jm_resume_id);        
    $query = $this->db->get();
    $row = $query->row();
    return $row->user_jm_id;

I don't know what cause this error.

El Forum

There shouldn't be any problem with that code.
You should look at the value of $jm_resume_id when this happens,i.e., find the place where this function is called and make sure the argument is sane. It could be that it's set to NULL or FALSE.
You could also switch the where line to this and see if it helps