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
https://forums.phpfreaks.com/topic/95019-trouble-with-select-using-interval/
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?

 

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.