rbragg
10-10-2007, 10:24 AM
I have this in my page:
SELECT *
FROM schema.call, schema.student, schema.status, schema.hall, schema.room
WHERE call.s_num = student.s_num
AND call.status_num = status.status_num
AND call.hall_num = hall.hall_num
AND call.room_num = room.room_num
AND student.s_first LIKE '%" . $gotStudent . "%' OR student.s_last LIKE '%" . $gotStudent . "%';
No matter what $gotStudent is I don't get results even if I know there are some. I have used SQL Plus for testing. If I enter a literal query wishing to return someone with the last name "Foster":
SELECT *
FROM schema.call, schema.student, schema.status, schema.hall, schema.room
WHERE call.s_num = student.s_num
AND call.status_num = status.status_num
AND call.hall_num = hall.hall_num
AND call.room_num = room.room_num
AND student.s_first LIKE '%fos%' OR student.s_last LIKE '%fos%';
I get "no rows selected".
SELECT *
FROM schema.call, schema.student, schema.status, schema.hall, schema.room
WHERE call.s_num = student.s_num
AND call.status_num = status.status_num
AND call.hall_num = hall.hall_num
AND call.room_num = room.room_num
AND student.s_first LIKE '%" . $gotStudent . "%' OR student.s_last LIKE '%" . $gotStudent . "%';
No matter what $gotStudent is I don't get results even if I know there are some. I have used SQL Plus for testing. If I enter a literal query wishing to return someone with the last name "Foster":
SELECT *
FROM schema.call, schema.student, schema.status, schema.hall, schema.room
WHERE call.s_num = student.s_num
AND call.status_num = status.status_num
AND call.hall_num = hall.hall_num
AND call.room_num = room.room_num
AND student.s_first LIKE '%fos%' OR student.s_last LIKE '%fos%';
I get "no rows selected".