Jump to content

[SOLVED] Why are my results being doubled?


brooksh

Recommended Posts

I want to skip the first row, and display upto the next 6 images. The example I'm using only has 4 images. Even if I change it to LIMIT 1,3 it still displays image2 image3 image4 image2 image3 image4.  I just want image2 image3 image4

 

$sql = "SELECT DISTINCT imagename FROM images WHERE id = '$id' LIMIT 1,6";	
        $result = mysql_query ($sql);
        while($row = mysql_fetch_array ($result, MYSQL_ASSOC))
						{
                        $result_array[] = $row['thumb_file_name'];
            }
$filename = implode(',',$result_array);

Link to comment
https://forums.phpfreaks.com/topic/147398-solved-why-are-my-results-being-doubled/
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.