Jump to content

Unusual error.


unsider

Recommended Posts

I'm trying to display the articles in my DB by 'GROUP BY date_posted DESC LIMIT 100', like so..

 

$query1="Select *,COUNT(*) FROM article INNER JOIN categories ON categoryID=catid GROUP BY date_posted DESC";

 

But when this query is called it only displays the first 8 DESC by title, but that's not even being called..

 

Then when i test out:

 

$query1="Select *,COUNT(*) FROM article INNER JOIN categories ON categoryID=catid GROUP BY title DESC";

 

It displays all of the entries correctly in DESC order.

 

I'm not quite sure why this is happening.

 

Here are the entries inmy DB respectively {

 

artid, name, title, body, date_posted, categoryID, artchild, date_updated, timestamp

 

}

 

There must be some rule about this type of query i don't understand.

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/115120-unusual-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.