I am trying to pull the latest five image thumbs from my booru datebase (I've been told this is the best way) yet I have no idea how to do this.
I will get all the info you might need as I might miss some.
Here is the image datebase layout:
And this is the site http://animelon.com/booru/
An example of what am trying to do is pull 5 thumbs just like you see on that URL above on to a custom html page, When the thumb/s are clicked it will take you to the main image page Example http://开发者_StackOverflowanimelon.com/booru/post/view/211337
If you need anymore info please ask.
Below is the SQL you need. You will need to use PHP or a similar language to connect to the DB and return the results to your application.
SELECT id, filename, width, height, ext, posted
FROM images
ORDER BY posted DESC
LIMIT 0,5
Create links based on the data from the rows:
for loop...
$row = odbc_fetch_array($result);
$output .= "<img src=\"".$row['filename'].$row['ext']."\" width=\"".$row['width']."\" height=\"".$row['height']."\"/>;
I left a lot of code out of the PHP, its just so you can get an idea.
精彩评论