php - MYSQL query with session variable -
the following query returns records of clients,
session $_session['client_id']
value 3
.
query works fine returns records of clients . want apply session value on select clauses
.
select mrk_lat,client_id,mrk_lng ,engine_status ,created_date,live_fuel, (select count(driver_id) we_drivers) total_drivers, (select count(veh_id) we_vehicles) total_veh, (select count(veh_status) we_vehicles veh_status=1) run_veh, (select count(veh_status) we_vehicles veh_status=0) stop_veh, (select client_id we_clients client_id =" . $_session['client_id'] . ") `we_vehicles_coordinates`
Comments
Post a Comment