06-28-2018, 08:06 AM
Hi,
I have a problem with FROM. I am trying a join two tables, but the FROM function is adding 1 number to SQL sentences.
My codes :
Output:
You can see there is a 1 number in FROM ...
How can I fix this ?
I have a problem with FROM. I am trying a join two tables, but the FROM function is adding 1 number to SQL sentences.
My codes :
PHP Code:
$company = $ci->db->select('MUST.*, PERS.*')->from('musteriler as MUST')
->join('ilgili_kisiler AS PERS', 'PERS.musteri_id = MUST.id', 'inner')
->get_where(array('PERS.id' => $person_id));
Output:
Code:
SELECT `MUST`.*, `PERS`.* FROM (`musteriler` as `MUST`, 1) INNER JOIN `ilgili_kisiler` AS `PERS` ON `PERS`.`musteri_id` = `MUST`.`id`
You can see there is a 1 number in FROM ...
How can I fix this ?