Hi, there
I am coding a blog post kind of thing, where the author will post the article and it will be displayed in the front end, my problem starts for selecting the posts as i have to meet certain conditions for posting the news in the front end,
I have 4 fields in the database namely
title
pic_title
pic_brief
pic_detail
you guessed it right apart from the title table the rest of three will hold the path to the images in varchar datatype, which will be used to display as the post, the format of the front end is such that
a) there will be total of eight post displaying in the front end (eight entries from the database)
b) there will be three post on the top which will include the value from the table title, pic_title and pic_brief (total of 3 values)
c) and the rest five will contain just the title and pic_title (excluding the three entries of top) Please NOTE: i want the second query to exclude the top 3 record which already exist in the top i.e (first query = 3 post in descending order, second query = 8 - first 3 = 5 post)
The Order of the Post i want is by id DESC
EDIT: I took the first query as
SELECT * FROM news ORDER BY id DESC LIMIT 3
Now if i take the same second query and try populating the values by desc order again the same records will be accessed
In simple words i want a query that will skip the last three records order by id DESC
How do i achieve this feat in PHP?