Okay I have 3 tables
1) Images - "image_id" "image_url" "image_thumb" "image_date"
2) User - "user_id" "user_name" "user_surname"
3) Other - "other_id" "other_note"
The image_id , user_id, other_id have the same number (to link them) my question is how will I go about linking the three and echoing the information. Keep in mind that some users don't have images
<?php
include('config.php');
$result = mysql_query("SELECT * FROM other, images, user WHERE other.other_uid = 1 AND images.image_id = 1 AND user.user_uid = 1 ORDER BY images.date DESC limit 5");
$url='http://localhost/petonline.co.za/data/';
while($row = mysql_fetch_array($result)){
echo "<B>".$row['pet_depo']."</b><br/>, Photo: <img src='".$url.$row['thumb']."'>, Name: ".$row['user_uid']."<br/><br/><br/>";
}