SMF Modifications => General Code/Script Inquiries => Topic started by: Fog on February 15, 2014, 10:48:04 PM

Title: Change from Weekly to Daily Date Stamp
Post by: Fog on February 15, 2014, 10:48:04 PM
I'm trying to modify this pickems game I found into a NCAA Bracket Game...

With football pickems it's a weekly date stamp or cut off.

function getCutoffDateTime($week) {
//get the cutoff date for a given week
global $db_prefix;
$sql = "select gameTimeEastern from " . $db_prefix . "schedule where weekNum = " . $week . " and DATE_FORMAT(gameTimeEastern, '%x') = '2014' order by gameTimeEastern limit 1; ";
$qryCutoff = mysql_query($sql);
if (mysql_num_rows($qryCutoff) > 0) {
$rstCutoff = mysql_fetch_array($qryCutoff);
return $rstCutoff['gameTimeEastern'];
die('Error getting cutoff date: ' . mysql_error());

I'm trying to convert weeks into days (rounds)

March Madness has several rounds within one week and I get a small error when I use the week table as a daily table and it shows up as a cutoff time.
EhPortal 1.29 © 2020, WebDev