Kod
<?php
include '../config.php';
$jutro = date('d-m-Y', time()+24*3600); // jutro
$wczoraj = date('d-m-Y', time()-24*3600); // wczoraj
$godzina = date("H:i:s");
$numerek = mt_rand(1,28);
$sql = "insert into numerek values('NULL', '".$jutro."', '".$numerek."','".$godzina."')";
$result = mysql_query($sql);
if($result) {
echo "Wylosowano numerek \"".$numerek."\" o godzienie \"".$godzina."\"."; } else {
echo "nieok"; }
?>
include '../config.php';
$jutro = date('d-m-Y', time()+24*3600); // jutro
$wczoraj = date('d-m-Y', time()-24*3600); // wczoraj
$godzina = date("H:i:s");
$numerek = mt_rand(1,28);
$sql = "insert into numerek values('NULL', '".$jutro."', '".$numerek."','".$godzina."')";
$result = mysql_query($sql);
if($result) {
echo "Wylosowano numerek \"".$numerek."\" o godzienie \"".$godzina."\"."; } else {
echo "nieok"; }
?>
jak zrobić, aby dodatkowo ten skrypt usuwał ostatni zapis w tabeli?
delete from numerek where costam=costam ? : >