I am try to join with two table.
This is my simple sql query:
$sql = "SELECT windows_users_image_upload.*, `windows_users_info`.`display`
FROM `windows_users_image_upload`,`windows_users_info`
WHERE `windows_users_info`.`user_id` = `windows_users_image_upload`.`user_id`
AND " . $field . "=" . $value;
It works fine, but I want to use CodeIgniter's query builder methods; something like this:
$this->db->select("windows_users_image_upload.*,windows_users_info.display");
$this->db->from("windows_users_info,windows_users_image_upload");
$this->db->where("windows_users_image_upload.".$field,$value);
$this->db->limit($takeTuple, $startTuple);
$this->db->join("windows_users_image_upload,windows_users_image_upload.user_id = windows_users_info.user_id");
$result = $this->db->get()->result();
but it's showing me this error:
Message: Missing argument 2 for CI_DB_active_record::join()
How can I fix this?
$this->db->join("windows_users_image_upload","windows_users_image_upload.user_id = windows_users_info.user_id");