php - Get the value of a cell in mysql table -
i'm using codeigniter write few lines of simple code value mysql table.
what i've tried:
$interview_id=45 $category_raw = $this->db->query("select category interview interview_id='$interview_id'"); $category = $category_raw->first_row();
but reason, $category shown "array()", while want value within.
any advice on how proceed?
thanks much,
try
$interview_id=45; $category_raw = $this->db->query("select category interview interview_id=$interview_id"); $category = $category_raw->first_row()->category;
or active record
$interview_id=45; $this->db->select("category"); $this->db->where("interview_id",$interview_id); $category_raw = $this->db->get("interview"); $category = $category_raw->first_row()->category;
Comments
Post a Comment