[Solved] Read the top 10 rows from the database


You can use PHPMyAdmin to create tables, or run a script like this:

CREATE TABLE Contents (
  Content MEMO NOT NULL,
  DatePosted DATE NOT NULL,
  Name VARCHAR2(200) NOT NULL);

and select the newest 10 like this:

SELECT
  t.Content,
  t.DatePosted,
  t.Name
FROM
  Contents t
ORDER BY
  DatePosted DESC
LIMIT 10

But while the answer seems small, it is actually a big question. Do you have no idea whatsoever? Maybe you should start by reading some tutorials if you don’t want to get stuck every time you need a little something from your database.

1

solved Read the top 10 rows from the database