Im trying to make a query to tell how many videos each user has uploaded, but the there are two tables and i need to sort by amount of videos descending
Heres what ive done
$query = "SELECT videos.*, signups.* ".
"FROM videos, signups ".
"WHERE videos.user_id = signups.user_id limit 5 ";
$result = mysql_query($query) or die(mysql_error());
// Print out the contents of each row into a table
while($row = mysql_fetch_array($result)){
echo $row['username']. " has ". $row[' ']." videos";
echo "<br />";
}
Heres my table structure
Table1:
signups (tabe name)
user_id | username
Table 2:
videos (Table name)
id | user_id
I proberly need a count or group in here but im uncertain