Jump to content

[SOLVED] Troubles with SQL Queries


garry

Recommended Posts

So I'm having a little trouble with my SQL queries and distinguishing between the different ID's that I want to get. Here's an example of a query (just made up to show you what i mean):

 

$query="
SELECT artists.id, reviews.id
FROM artists, reviews
WHERE blah blah blah
";

$result = mysql_query($query);

while ($row = mysql_fetch_assoc($result)) {
echo  $row['id'];
}

 

So how can I make it so I can distinguish from which table I want to get the ID from?

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/106269-solved-troubles-with-sql-queries/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.