Posted 27 August 2006 - 12:29 PM
- Status (This is set to 1 if verified 0 if not)
I am wanting to query the database and show the tracks (from the tracks table) by users that have been verified (taken from the users table).
I have looked at many tutorials but can't get this to word. Does anybody know the correct syntax for this query?
Any help much appreciated.
[a href="http://www.studioeight.net" target="_blank"]www.studioeight.net[/a]
Posted 27 August 2006 - 03:32 PM
SELECT tracks.*, status FROM tracks, users where user.status = 1;
ps I don't see why username is in the tracks database should it be songname?
Posted 27 August 2006 - 03:36 PM
Select * FROM tracks NATURAL JOIN users;
Posted 28 August 2006 - 10:14 PM
SELECT tracks.*FROM tracks INNER JOIN users ON ( tracks.username = user.username ) where user.status = 1;
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users