|
-
Aug 20th, 2013, 09:08 AM
#1
Thread Starter
Fanatic Member
Why does this SELECT DISTINCT querie not work?
Hi Guys,
For some reason this isnt working and wont display any results...
Any ideas?
<?
$query1 = mysql_query ( "SELECT DISTINCT `artist` FROM `Artists` WHERE `Genre1` = '$usr->Genre1' OR `Genre2` = '$usr->Genre1' OR `Genre3` = '$usr->Genre1' OR `Genre1` = '$usr->Genre2' OR `Genre2` = '$usr->Genre2' OR `Genre3` = '$usr->Genre2' OR `Genre1` = '$usr->Genre3' OR `Genre2` = '$usr->Genre3' OR `Genre3` = '$usr->Genre3' ORDER BY RAND() LIMIT 0,1" );
while ( $art = mysql_fetch_object ( $query1 ) )
{
?>
Basically, I need it to select an artist and it will display the artist picture, but at the moment it sometimes shows the same artist more than once.
Regards,
Jamie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|