Jump to content

Sorting mySQL Results


Hartley

Recommended Posts

All right, in this table, there are two different columns with timestamps, going to give them the variables $join and $leave for now. I can select all of them just fine, however, I need to do one sort. I need to see how many of these have a difference of two weeks in the $join and $leave (Or 1209600 difference in the timestamps).

 

I simply need a count of of them. Is there a way to construct this query to get what I'm looking for?

Link to comment
Share on other sites

It works good so far, but when I throw in a count(id), I get another error. Is there perhaps a way to do the count outside of the mySQL, or with a different syntax, so I can get a count of all the rows that fit this query?

 

Thanks again!

 

Mixing of GROUP columns (MIN(),MAX(),COUNT()...) with no GROUP columns is illegal if there is no GROUP BY clause
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.