I have written a php script file that gives the output in a pdf on a weekly basis , image one is my current output. I want to get my output to be something like image one. any help would be appreciated.
conditions:
- If it is the same radio ID and same event type print only the date Time column .
- if it is same radio ID and different event Type , print only event type and date stamp.
- a name can have multiple radio Ids.
this is my select statement :
$query = "SELECT Events.*,Types.description AS channel_description, subs.name AS name FROM Events LEFT JOIN Types ON Types.channel_type_id = Events.channel_type_id LEFT JOIN Subscribers AS subs ON subs.radio_id=Events.radio_id AND subs.network_id=2 WHERE event_type_id ='V' AND Events.radio_id IN ( ";
$query .="SELECT Subscribers.subscriber_id FROM Subscribers ";
$query .= "WHERE network_id=2 AND dealer_id='".$customer['cust_id']."')";
$query .= " AND event_date > DATE_SUB(DATE_SUB(curdate(), INTERVAL 3 WEEK), INTERVAL DAYOFWEEK(curdate()) DAY) ORDER BY Events.subscriber_id DESC, Events.event_time ASC";
[
[
Aucun commentaire:
Enregistrer un commentaire