MySQL interesse |
|
Ik heb momenteel de volgende code, die zou moeten werken.. Alleen werkt 'ie niet.
if($obj->vraag_status == 3){
$status = "Wordt beantwoord";
$button = "disabled";
$data2 = mysql_query("SELECT UNIX_TIMESTAMP(`vraag_datum`) AS `vraag_datum`,0 FROM `helpdesk` WHERE `vraag_ID`='".$obj->vraag_ID."' LIMIT 0,1");
$data1 = mysql_fetch_object($data2);
$diff = ($obj->vraag_datum + 1600)-time();
$verschil = date("H:i:s", "$diff");
$verschilm = date("i", "$diff");
if($verschilm > 60){
$status = "Open";
$button = "";
}
}elseif($obj->vraag_status == 2) {
$status = "Open";
$button = "";
}
if($obj->vraag_status == 3){ $status = "Wordt beantwoord"; $button = "disabled"; $data2 = mysql_query("SELECT UNIX_TIMESTAMP(`vraag_datum`) AS `vraag_datum`,0 FROM `helpdesk` WHERE `vraag_ID`='".$obj->vraag_ID."' LIMIT 0,1"); $diff = ($obj->vraag_datum + 1600)-time(); $verschil = date("H:i:s", "$diff"); $verschilm = date("i", "$diff"); if($verschilm > 60){ $status = "Open"; $button = ""; } }elseif($obj->vraag_status == 2) { $status = "Open"; $button = ""; }
|