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? Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
flemingmike Posted October 20, 2010 Author Share Posted October 20, 2010 any direction is appreciated Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.