seopti
asked on
php operator question
I do a mysql query on DATABASE1 and get echo a business name (bizName) with the code below.
Now if I receive a second database which is called DATABASE2 - I do exactly the same query to echo a business name on DATABASE2.
What I would like to do is NOT to echo a business name when I query DATABASE2 if the business name string is exactly the same string as in DATABASE1.
Thanks for help!
Now if I receive a second database which is called DATABASE2 - I do exactly the same query to echo a business name on DATABASE2.
What I would like to do is NOT to echo a business name when I query DATABASE2 if the business name string is exactly the same string as in DATABASE1.
Thanks for help!
<table style="width:550px ;line-height:20px">
<?php
$counter=0;
$result1 = mysql_query("SELECT bizID,bizName,bizAddr FROM DATABASE1 WHERE bizState='$bizState'GROUP by bizName LIMIT 12");
while($r=mysql_fetch_array($result1))
{
$bizID = $r['bizID'];
$bizName = $r['bizName'];
$bizAddr = $r['bizAddr'];
$bizCityLink = str_replace(" ","-",$bizCity);
$bizCityLink = strtolower($bizCityLink);
$bizStateLink = strtolower($bizState);
$bizNamev = replaceForLink($bizName);
$bizNameLink = replaceForText($bizName);
if($counter==0)
{
echo "<tr>";
}
echo '<td><a href="'. $urlPrefix . $bizStateLink . '/' . $bizCityLink . '/' . $bizID . '-' . $bizNamev . '.html">' . $bizNameLink .'</a><br>
</td>';
if($counter==1)
{
echo "</tr>";
$counter = 0;
continue;
}
$counter++;
}
?>
</table>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you only want to return values that aren't in DATABASE1 then you could do it with a query.