View Single Post
  #2 (permalink)  
Old February 20th, 2005, 12:23 PM
Gotaka4 Gotaka4 is offline
Authorized User
 
Join Date: Jan 2005
Location: , , .
Posts: 82
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i think you got your query the other way around. It should be like:

$sql = "SELECT * FROM staff, student WHERE staff.f_Username LIKE '%$user%' OR student.t_Username LIKE '%$user%'";
$result = mysql_query($sql) or die (mysql_error());

while ($row = mysql_fetch_assoc($result)){
    //Here you can print your data however you like.
    //$row is an array that contains all of your results and you can
    //display them like the following.
    echo $row['f_Username'];
}

----------------
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
Reply With Quote