Select * Group By, Order By, Limit?
Hello im new here but not to web developing...
well i have a news system made in php, it retrieves all the data from a phpbb forum in a mysql db right?
What i wanted to do was select only the first post of every forum i chose and not the other posts which are the replies...
so i tried many things, first something like:
$offset varies depending on the page you are in in the news and $newsperpage is a defined variable (it is 5) in php.
But it does show replies i think it's beacuse of the limit...
i tried this too:
But it shows them too...
and i think it is a LIMIT problem because if i remove the LIMIT and try the queries both work perfectly, without no replies.
What can i do??
i don't want to remove the LIMIT because then if i have many news it would take a looong time to load the query in each page... which would be unnecesary.
Thx in advance to you all!
P.S:i have also tried something with a DISTINCT but i wasn't sure how the SELECT * but DISTINCT topic_id so it didn't work neither... :sick: