if the fieldname is not unique between the two tables, you might have some problems. So to obviate this problem, either use the numerical index of the array or do this as your select statement.:
$sql = "SELECT f_Username as username, t_Username as staff_username FROM staff, student WHERE staff.staff_username LIKE '%$user%' OR student.username LIKE '%$user%'";
----------------
Never bother to learn something not knowing which does not do you any harm, and never neglect to learn something whose negligence will increase your ignorance - Imam Jafar Sadeq
|