Jump to content

Please Help With Between Dates


just me and php

Recommended Posts

what im trying to do is only post 14 days between dates,nothing before or after the dates i put in the code.
im not very good at this but in learning.

Here Are Peaces Of The Code If Someone Could Fill In The Code That I Need That Would Be Great ;)
[code]$p_id1 = 'Danger Zone';
$p_id = $_GET['id'];
$query = "SELECT  recno,disp,track,Username,online,date    , MIN(HL_MS) AS HL_MS,reshack,hacked FROM mydbtable WHERE  track = '$p_id1' GROUP BY 'disp','online','Username','track' ORDER BY 'HL_MS' ASC 
";
$result = mysql_query($query) or die("There was a problem with the SQL query: " . mysql_error());
[/code]
and
[code]
$f1= $row[recno];
$f2 = $row[disp];
$f3 = $row[HL_MS];
$f4 = $row[track];
$f5 = $row[Username];
$f6 = $row[date];
$f7 = $row[TRT_MS];


line 43  if($row[date]==' 01/27/07 23:59:59 - 100 years'){$f1,$f2,$f3,$f4,$f5,$f6,$f7='';}
line 44  if($row[date]==' 02/11/07 23:59:59 + 100 years'){$f1,$f2,$f3,$f4,$f5,$f6,$f7='';}


echo "<td align=left bgcolor=$bgcolor id='title'><font face='Verdana' size='2'><B>$rank.</B></font></a></td>\n";
echo "<td align=left bgcolor=$bgcolor id='title'><font face='Verdana' size='2'><B>$f1</B></font></a></td>\n";
echo "<td align=left bgcolor=$bgcolor id='title'><font face='Verdana' size='2'><B>$f2</B></font></a></td>\n";
echo "<td align=left bgcolor=$bgcolor id='title'><font face='Verdana' size='1'><B>$f3</B></font></a></td>\n";
echo "<td align=left bgcolor=$bgcolor id='title'><font face='Verdana' size='1'><B>$f4</B></font></a></td>\n";
echo "<td align=left bgcolor=$bgcolor id='title'><font face='Verdana' size='1'><B>$f5</B></font></a></td>\n";
echo "<td align=left bgcolor=$bgcolor id='title'><font face='Verdana' size='1'><B>$f6</B></font></a></td>\n";
echo "<td align=left bgcolor=$bgcolor id='title'><font face='Verdana' size='1'><B>$f7</B></font></a></td>\n";
[/code]
and my parse error
Parse error: syntax error, unexpected ',' in /bla/bla/contest.php on line 43
yes i know this error is due to $f1,$f2,$f3,$f4,$f5,$f6,$f7 but i dont know any way to do what im trying to do
Link to comment
https://forums.phpfreaks.com/topic/36422-please-help-with-between-dates/
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.