If I run this query in the PHP Admin it displays 2 records
SELECT staff.emp_no, staff.fName, staff.lName, event.event_date, event.timeStart, event.timeEnd, event.emp_no, event.agenda
FROM staff, event
WHERE staff.emp_no = event.emp_no
AND event.emp_no =201
AND event.event_date = "27-01-2008"
AND timeStart = "1020"
The above query gives
Results
emp_no fName lName event_date timeStart timeEnd emp_no agenda
201 John Atkins 27-01-2008 1020 1105 201 urgent meeting
201 John Atkins 27-01-2008 1020 1100 201 brief discussion
If I fill out a form and types in 27-01-2008 as the value for the variable $e_date, 201 for $check_array and 1020 for $s_time therefore making this new query
$sql = 'staff.emp_no, staff.fName, staff.lName, event.event_date, event.timeStart, event.timeEnd, event.emp_no, event.agenda FROM staff, event WHERE staff.emp_no = event.emp_no AND event.emp_no = "$check_array" AND event.event_date = "$e_date" AND timeStart = "$s_time"';
with this query from PHP prodices a ZERO record, can somebody tell me what is wrong? because even if I do a $count on mysql_fetch_array() I do not get a value greater than 0.