Okay, so I currently have a school project which is based on making a website. On my main page I have a "last news" section. I want the news in this section to update whenever a new item is added to my database. The news section contains three divs where I want my three newest database items to be added. Normally I would do this by writing the following SQL code:
SELECT carName
FROM cars
ORDER BY carName DESC
LIMIT 3
However the three divs where I want the newest items to go, are separated. And by using this method they wouldn't be separated. I do not have a lot of knowledge on neither PHP or SQL. Our curriculum is based 100% around using dreamweaver to manage our site (I do however know how to use HTML and CSS).
My question is: Is there a way to make three different recordset which only returns the item at f.ex. the second index? If this was possible I could simply place the return values in the three divs.
What I use to make my site: Dreamweaver WAMP (PHPMyAdmin).
Aucun commentaire:
Enregistrer un commentaire