when I execute a sql query in codeigniter using $this->db->query($sql); it gave me an empty result. But when I directly execute the same query from mysql it gives me the correct result. If Anyone have faced this problem help me ?
I have more sql queries in the same project and those are working fine.
query -
$sql = 'select r.no from routes r where r.id =
(select rp.route_id from routes_and_places rp where rp.place_id =
(select p.id from places p where p.name = \''.$place.'\'));';
When this executes I got exact query by print_r($sql); and I executed it directly in mysql and it gave me the expected result.
If anyone know the solution please help
(;)that you have in your query - Anant Kumar Singh