Hi There,
I am still pretty new to this, most of the stuff I have learned was shown to be by my cousin so forgive me If I am doing it wrong. Anyways I have a php search on page that search’s one table but I would like it to search two tables, is this possible and if so how would I do it?
[php]//collect
if (isset($_POST[‘search’])) {
$searchq = $_POST[‘search’];
$query = mysql_query("SELECT * FROM Players WHERE FirstName LIKE '%$searchq%' OR LastName Like '%$searchq%' OR FullName LIKE '%$searchq%' ") or die(mysql_error());
$count = mysql_num_rows ($query);
if($count == 0){
$output = ‘There was no search results!’;
}else{
while($row = mysql_fetch_array($query)) {
$fname = $row[‘FirstName’];
$lname = $row[‘LastName’];
$PlayerID = $row[‘PlayerID’];[/php]
[code] $output .= “<a href=“cnghlplayerinfo.php?PlayerID=”.$row[‘PlayerID’].’” style=“text-decoration:none;”>’.$row[‘FirstName’]." “.$row[‘LastName’].”
";
}
}
}
?>
Search Player [/code]