• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help with mysql query

#7
[eluser]davidbehler[/eluser]
something like this might work
Code:
$result = $this->db->query("select date_format(date_from_column, '%u') as first_week, date_format(date_to_column, '%u') last_week from table");
$row = $result->row_array();
for($i = $row['first_week']; $i <= $row['last_week']; $i++)
{
   echo "This is week $i";
}


Messages In This Thread
help with mysql query - by El Forum - 08-20-2009, 10:24 PM
help with mysql query - by El Forum - 08-21-2009, 02:25 AM
help with mysql query - by El Forum - 08-21-2009, 03:26 AM
help with mysql query - by El Forum - 08-21-2009, 11:49 AM
help with mysql query - by El Forum - 08-21-2009, 12:17 PM
help with mysql query - by El Forum - 08-21-2009, 12:29 PM
help with mysql query - by El Forum - 08-21-2009, 12:34 PM
help with mysql query - by El Forum - 08-21-2009, 12:40 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.