Re: display a single thumb per gallery

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



http://dev.mysql.com/doc/refman/5.0/en/join.html

you could use something like this:

SELECT DISTINCT thumbnails.gallery, thumbnails.id, thumbnails.binary_data FROM thumbnails

you can insert everything you want from your table after the DISTINCT by writing:
table.colName

/frank

27 aug 2006 kl. 21.39 skrev <ross@xxxxxxxxxxxxx> <ross@xxxxxxxxxxxxx>:

$query = "SELECT distinct gallery FROM thumbnails";

that only returns the numbers 7 & 8. I need the all the info from the rows - id, binary data etc....something like

$query = "SELECT * FROM DISTINCT gallery FROM  thumbnails";


any ideas?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux