FaaPz / PDO

Just another PDO database library
MIT License
316 stars 103 forks source link

Join not working with where #67

Closed nidhi0801 closed 5 years ago

nidhi0801 commented 7 years ago

Hi,

My query is

$resultObj = $this->db->select()->from('shuttles') ->leftJoin('routes', 'routes.id', '=', 'shuttles.route_id') ->leftJoin('schedules', 'schedules.id', '=', 'shuttles.schedule_id') ->where('shuttles.id', '=', '4') ->where('shuttles.status','=','active')->execute();

    $result = $resultObj->fetchAll();

[Uploading whirlpool_mobility_qa3-29 PMtest.txt…](SQL export of tables)

its not returning me data for shuttle id =4.

Join not working with where conditions. Can you please let me know the solution for the same

dfelix commented 6 years ago

->whereMany(array('shuttles.id'' => 4, 'shuttles.status' => 'active'), '=');

kwhat commented 5 years ago

1.x is not seeing much activity at the moment, please look into upgrading to v2.