dobry den, mam takyto prikaz:
$time = time();
$sql = mysql_query("SELECT * FROM zapasy WHERE time > $time");
a vysledky mi neozbrazi ziadne.....a pritom tie udaje v db vacsi ako skutocny time();
co mam zle?dakujem
dobry den, mam takyto prikaz:
$time = time();
$sql = mysql_query("SELECT * FROM zapasy WHERE time > $time");
To crAzY^ :
stlpec time ma taketo udaje:
typ:bigint(50)
a nachadzaju sa v nom len cisal(cas a datum)
priklad:
1234540800
To crAzY^ :
$datum=$_POST['datum'];
$hodina=$_POST['hodina'];
$minuta=$_POST['minuta'];
$microdate = EregI_Replace("/", "-", $datum);
$micro_nahrada = "".$microdate." ".$hodina.":".$minuta."";
$microtime = strtotime("$micro_nahrada");
<?php
$cas=strtotime("13-3-2009 10:00");
$time = time();
if ($cas>$time){
echo strtotime("13-3-2009 10:00"), "je viac ako";
echo $time;
}
if ($cas<$time){
echo strtotime("13-3-2009 10:00"), "je menej ako";
echo $time;
}
?>
tak problem som vyriesil mal som takyto kod:
<?
$cas = time();
mysql_query("SELECT * FROM tabulka WHERE stlpec NOT LIKE 0 AND time < $cas");
<?
$cas = time();
mysql_query("SELECT * FROM tabulka WHERE stlpec NOT LIKE '0' AND time < $cas");
Ano, opravdu chci reagovat → zobrazí formulář pro přidání příspěvku