flemingmike Posted October 20, 2010 Share Posted October 20, 2010 hi, i have a field for price that gets returned. is there a way to do ORDER BY 'category' so that i can have tally at the bottom of each category that adds all the prices together? Link to comment https://forums.phpfreaks.com/topic/216333-order-by-grouping/ Share on other sites More sharing options...
flemingmike Posted October 20, 2010 Author Share Posted October 20, 2010 this would help me also: what is the propper way to write this: $mechanic1 = mysql_query("SELECT * FROM staff ORDER BY name"); while($row44 = mysql_fetch_array($mechanic1)) { $meid=$row44['eid']; } $result3 = mysql_query("SELECT * FROM timesheet WHERE date >= '$payperiodstart' AND date < '$payperiodend' ORDER BY '$meid' "); while($row3 = mysql_fetch_array($result3)) { reason being is that inside timesheets, i have an employeeid field (eid). im hoping that with result3 i can have it ordered by the mechanic name even though i dont have a field in timesheets for name. Link to comment https://forums.phpfreaks.com/topic/216333-order-by-grouping/#findComment-1124243 Share on other sites More sharing options...
flemingmike Posted October 20, 2010 Author Share Posted October 20, 2010 any direction is appreciated Link to comment https://forums.phpfreaks.com/topic/216333-order-by-grouping/#findComment-1124468 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.