I am trying to query a table where at least three conditions have to be met and then the outcome stored in an array and printed into a table.
I tried with the code, but I am having problems setting the conditional query and would be happy with an assistance
$search1 = mysql_connect('','', '') or die('Could not connect: ' . mysql_error());
echo 'Connected successfully';
mysql_select_db("hello",$search1) or die ('Could not connect ' .mysql_error());
$my_checked = $_SESSION['check_array'];
FOREACH ($_SESSION['check_array'] as $check_array)
{ // conditional query of database
$get_event = "select * from event where event_time like $_SESSION['event_time'] and emp_no like $_SESSION['check_array']";
/**
* put the results into an array and then print a table like this
* the status should be checked
* if my_status =='ongoing' status should be busy
* if my_status =='cancelled' status should be free
* if my_status =='' status should be free
*
* fname lname event_date event_time status
*
* john andrews 20-11-2008 1120 free
*
* sly samuels 20-11-2008 1120 busy
*
*
*/
}
?>