Jump to content

Trouble with select using Interval


amites

Recommended Posts

Hello,

 

I'm having trouble figuring out why this query isn't working for me

 

Code:

 

SELECT
Count(s.id)
FROM
bil_msg_sent AS s
WHERE
s.created BETWEEN  now() AND now()  - INTERVAL 172 hour
AND s.active =  '1'

 

 

fairly straight forward, if you'd like I can post database info though I don't think it's needed,

 

any help and/or advice is greatly appreciated

Link to comment
Share on other sites

for some additional notes

 

this query does not give me any errors, nor does it provide me with any results, perpetually 0

 

changed the interval from 24 hour to 72 to 172 always 0 results,

 

this query is written to do what I want with it, though I'm having syntax trouble,

 

anyone out there that can point me in the right direction?

 

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.