php - Two SELECT actions in a query with PDO -
i trying perform search date range - result, display rows has particular value (listed in different column). means 2 select actions involved in query. not getting through query correctly.
my query here
$sql="select (select * `student_db` `stu_registered_date` between '2015-01-07' , '2015-01-17') `stu_trainer_id` 'trainer-1'"
you not need 2 queries rather 1 query 2 conditions
select * `student_db` `stu_registered_date` between '2015-01-07' , '2015-01-17' , `stu_trainer_id` = 'trainer-1'
Comments
Post a Comment