Page 1 of 1
I need some quick help....
Posted: Mon Apr 02, 2007 4:57 pm
by mostwanted
Hi guys!
I'm new here and also very new to PHP... so please bare with me...
What I need help in is, I'm trying to display 4 of the last images I added from my database with 2 images on the top and 2 images on the bottom.
Could anyone please help me with this??
Thanks in advance!
Re: I need some quick help....
Posted: Mon Apr 02, 2007 5:01 pm
by John Cartwright
mostwanted wrote:What I need help in is, I'm trying to display 4 of the last images I added from my database
Assuming your using mysql..
Do you have an auto incrementing key? If so, you could use a query like
Code: Select all
SELECT * FROM `images` ORDER BY `id` DESC LIMIT 4
mostwanted wrote:with 2 images on the top and 2 images on the bottom
Not sure what this means.
Posted: Mon Apr 02, 2007 5:10 pm
by mostwanted
How would I be able to have them show up..
I tried that and it didn't work..
As far as the, "with 2 images on the top and 2 images on the bottom". I would like to have 2 images show on top and 2 images on the bottom of a table...
Thank you very much for the reply!!
Posted: Mon Apr 02, 2007 6:44 pm
by RobertGonzalez
You need to use the mysql_* functions to connect to the database, execute the query, fetch the results and echo them.