Kristopher
Photographer
- Dec 25, 2010
- 803
- 68
I'm currently trying to get the script created below to show information from 2 tables, users and users_settings and so far its not displaying either. I know for a fact this script created works when you are just calling for one table in the database just not sure how to join both tables in one query if that makes sense.
<?php
$query = "SELECT username, respects_received, look FROM users AND users_settings WHERE rank < 7 ORDER BY respects_received DESC LIMIT 10";
$result = mysql_query($query);
while($row = mysql_fetch_array($result)){
?>
To call it <?php echo $row['respects_received']; ?>
$query = "SELECT username, respects_received, look FROM users AND users_settings WHERE rank < 7 ORDER BY respects_received DESC LIMIT 10";
$result = mysql_query($query);
while($row = mysql_fetch_array($result)){
?>
To call it <?php echo $row['respects_received']; ?>