Im having a problem retrieving some data from 2 tables and then displaying the output into one area.
This is the code for the retrieve I have
$select_users = "SELECT CarID, Model, Year, Price, ManuName FROM Vehicle, Manufacturer";
//run query
$result = mysql_query($select_users);
This is the code for the output
<?php
while ($user = mysql_fetch_array($result)){
$user_row = sprintf(
"<li><a href='select_veh.php?CarID=%d' class='mainnavstyle'>%s %s %s %s</a></li>",
$user['CarID'],
$user['ManuName'],
$user['Model'],
$user['Year'],
$user['Price']);
echo $user_row;
}
?>
I cant seem to get 'ManuName' to show properly as its from a different table. At the moment with this code im getting duplicate results:
honda Civic 2000 $15,000
honda Corolla 1991 $5,000
Toyota Civic 2000 $15,000
Toyota Corolla 1991 $5,000
Instead of just
Honda Civic 2000 $15,000
Toyota Corolla 1991 $5,000
Any help would be greatly appreciated thanks