Hi all,
can someone look at my very untidy code and maybe give me some pointers.
Searching for values by the hour.
etc
for ($i = 0; $i <= 23; $i++)
{
$query = "select count(num) as mycount from dundeefw where date=$date
and action=1 and time=hour($i)";
// Execute query
$result = mysql_query($query) or die ("Query Failed");
while ($row = mysql_fetch_array ($result))
{
$connection[$i] = $row["mycount"];
}
}
I am wondering if there is anyway using SQL to avoid doing this the very
messy way.
many thanks
Leon.
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php