Pistike 2: időponthoz kötve!


$now = date("Y");
$now = $now.("-");
$now = $now.date("m");
$now = $now.("-");
$now = $now.$day;
$nowsql = $now;
$now = $now.(" ");
$now = $now.$time;

$q = mysql_query( "SELECT * FROM tabla WHERE starttime LIKE '%$nowsql%' AND ip = '$ipaddr' ");
while ( $t = mysql_fetch_array( $q ) ) {
if ($t[starttime] < $now && $t[stoptime] > $now ) {
/* stuff */
$q2 = mysql_query( “SELECT * FROM masiktabla WHERE user = ‘$t[user]’”);
$t2 = mysql_fetch_array( $q2 );
/* stuff */
}
}

Medve szerezte, de megérdemel egy postot. Zseniális, én mondom, zseniális!

2008-06-11 12:13 | dev, paraszt | Peter

Comments are closed.