amites Posted March 8, 2008 Share Posted March 8, 2008 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 Quote Link to comment Share on other sites More sharing options...
amites Posted March 8, 2008 Author Share Posted March 8, 2008 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? Quote Link to comment Share on other sites More sharing options...
fenway Posted March 10, 2008 Share Posted March 10, 2008 Drop the where clause -- switch to count(*). Assuming you get back non-zero, start adding it back piece by piece. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.