This code created by my webmaster, this webmaster has now dissapeared and i need some help :/
Iv translated the sentence that comes after the row of code im reffering to.
also pointed it out with an arrow.
Anyhow this is the problem it stops double booking as in it wont take another booking at the exact same time and date, but it will allow someone to book 30 minutes later. wich just wont work since the first job takes 3 hours plus 1 hour driving.
So a friend of mine tipped me about time and intervals in SQL?
something like:
"where time is bla bla +interval 4 hours bla bla"
I really wouldnt know thats why im asking you guys!
Thanks!
switch ($_GET['steg']) {
case 1:
sysCalendar(!isset($_GET['datum']) ? date("Y") : substr($_GET['datum'],0,4),!isset($_GET['datum']) ? date("m") : substr($_GET['datum'],5,2));
break;
case 2:
if (!isset($_POST['dDatum']) || $_POST['dTid'] == "")
{
sysError('Felaktigt datum/tid, var god ange både datum och tid.<br><br><a href="javascript:history.back(1);">Tillbaka</a>');
break;
}
if (sysCheckDb(str_replace('.','-',$_POST['dDatum']).' '.substr($_POST['dTid'],0,2).':'.substr($_POST['dTid'],2).':00') == 'FALSE') <---- this sentence
{
echo 'The time you have chosen is allready booked. Please try another one. dig.<br><br><a href="javascript:history.back(1);">Tillbaka</a>';
}
else
{
sysForm($_GET['tjanst']);
}
break;
case 3:
sysConfirm($_GET['tjanst']);
break;
case 4:
sysComplete();
break;
default:
break;
}