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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.