Thanks in advance
Latest Images
Moderator: General Moderators
-
Simon18711
- Forum Newbie
- Posts: 4
- Joined: Fri Feb 21, 2003 7:27 pm
Latest Images
Ok well i dont know if there is a script for this or not but i'll try explain the sort of thing i want!
BASICLY my image will be recorded into a MYSQL databases, with id's etc and what i want to do is show the latest pictures that have been uploaded (as images) on my main page?! If u see what i mean?! so i have the id, what directory its on etc on the database! is there any code that can do that?!
Thanks in advance

Thanks in advance
if id is an auto-increment field the latest entry should be the one with the highest id.
try something likeas query string
http://www.mysql.com/doc/en/Sorting_rows.html
http://www.mysql.com/doc/en/example-Maximum-row.html
http://www.mysql.com/doc/en/SELECT.html
try something like
Code: Select all
SELECT ...,id from tablename ORDER BY id DESC LIMIT 1http://www.mysql.com/doc/en/Sorting_rows.html
http://www.mysql.com/doc/en/example-Maximum-row.html
http://www.mysql.com/doc/en/SELECT.html
here's the best source on storing and retrieving images, and whatever else, in a database, that I've found.
http://www.devshed.com/Server_Side/PHP ... age1.html
Take a gander, hope it helps.
http://www.devshed.com/Server_Side/PHP ... age1.html
Take a gander, hope it helps.