Die Ausgabe der Show Last-Abfrage ist:
Code: Select all
SELECT * FROM (`sessions`)
WHERE `session_id` = '034594375ce4c6f3d1b3b95c5cfc5bed'
AND `user_agent` = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:39.0) Gecko/20100101 Firefox/39.0'
Warum wird aus der Sitzungstabelle gezogen?
Der Code für meine Abfrage ist hier:
Code: Select all
public function getByBlpIdSmallJoin($blp_id) {
$this->db->select('nlp_screenings.*,nlp_screenings.id as nlp_screening_id,screenings.*, screenings.id as screening_id, nlp_screenings.launched as nlp_screenings_launched, DATE_FORMAT(screenings.screening_time, "%c/%d/%Y") as screening_date, DATE_FORMAT(screenings.screening_time, "%h:%i %p") as the_screening_time', FALSE);
$this->db->from($this->db_table_name);
$this->db->join('screenings', 'nlp_screenings.screening_id=screenings.id');
$this->db->join('blp', 'blp.id=nlp_screenings.blp_id');
$this->db->where('blp_id', $blp_id);
$this->db->where('archive', '0');
$this->db->where('printed_pass', '0');
$query = $this->db->get()->result();
echo $this->db->last_query();
return $query;
}
Mobile version