note 43422 added to function.empty
| From: | aini at hpj dot gov dot my | Date: | Mon, 21 Jun 2004 06:51:26 +0000 |
| Subject: | note 43422 added to function.empty | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-71421@lists.php.net to get a copy of this message | ||
How to repair this bug? I think something wrong in the mySQL part! Thanx..
$mangkuk = "SELECT id FROM ".SQL_PREFIX."events\n"
."WHERE eventtype = '$eventtype'\n"
."AND startdate = $startdate\n"
."AND starttime = '$starttime'\n";
$ion = $db->Execute($mangkuk);
if(!empty($mangkuk['events']))
{
$id = $db->GenID(SQL_PREFIX . 'sequence');
$query = "INSERT INTO $table\n"
."(id, uid, startdate, enddate, starttime, duration,"
." subject, description, eventtype, calendar)\n"
."VALUES ($id, '$uid', $startdate, $enddate,"
."'$starttime', '$duration', '$subject',"
."'$description', '$typeofevent', '$calendar_name')";
}
else
{
$row = $ion->FetchRow();
echo $row['eventtype'];
soft_error( 'The room has already been booked.');
}
}
----
Manual Page -- http://www.php.net/manual/en/function.empty.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+43422
Delete -- http://master.php.net/manage/user-notes.php?action=delete+43422&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+43422&report=yes
Search -- http://master.php.net/manage/user-notes.php