Jump to content

[SOLVED] if questions..


techker

Recommended Posts

hey guy i have this script that inputs in a db how many times you done this week..

 

so i made a page that views the hours and i would like to but an if in every query that if there is nothing in the db output OFF

 

this is my query

 

$query3 = "SELECT COUNT(*) AS TotalCount, `to_t2` - `from_t2` AS TotalNumber, SUM( `to_t2` - `from_t2`) AS Totalhours FROM `week2`GROUP BY `from_t2` ";
$result3 = mysql_query($query3) or die(mysql_error());

 

can i add an order by even if there is a group by?

Link to comment
https://forums.phpfreaks.com/topic/125220-solved-if-questions/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.