mirror of
https://github.com/fspc/Yellow-Bike-Database.git
synced 2025-02-22 00:53:22 -05:00
Closes #76. Shows actual visits by contact_id, rather than visitations for each shop_visit_id.
This commit is contained in:
parent
b8a42f11a0
commit
01293db335
@ -54,7 +54,7 @@ $editFormAction_no_shopid = $_SERVER['PHP_SELF'] . "?shop_date=$shop_date";
|
||||
mysql_select_db($database_YBDB, $YBDB);
|
||||
$query_Recordset1 = "SELECT shops.shop_id, date, DAYNAME(date) as day ,shop_location, shop_type, ip_address,
|
||||
IF(SUBSTRING(date,1,10) = curdate(),1,0) AS CanEdit,
|
||||
COUNT(shop_visit_id) AS num_visitors,
|
||||
COUNT(DISTINCT contact_id) AS num_visitors,
|
||||
ROUND(SUM(HOUR(TIMEDIFF( time_out, time_in)) + MINUTE(TIMEDIFF( time_out, time_in))/60)) AS total_hours
|
||||
FROM shops LEFT JOIN shop_hours ON shops.shop_id = shop_hours.shop_id
|
||||
WHERE date <= '{$shop_date}' {$shop_dayname} GROUP BY shop_id
|
||||
|
Loading…
x
Reference in New Issue
Block a user