shane18 Posted September 21, 2009 Share Posted September 21, 2009 How can you put a function into a SQL line correctly? $sql = "SELECT e_mails FROM mail_useage WHERE date=date("Y-m-d", TIME() - 18000)"; Would the code above work? If not, why not? Quote Link to comment Share on other sites More sharing options...
alexdemers Posted September 21, 2009 Share Posted September 21, 2009 How can you put a function into a SQL line correctly? $sql = "SELECT e_mails FROM mail_useage WHERE date=date("Y-m-d", TIME() - 18000)"; Would the code above work? If not, why not? Use concatenation: $sql = "SELECT e_mails FROM mail_useage WHERE date=".(date("Y-m-d", TIME() - 18000)); Quote Link to comment Share on other sites More sharing options...
shane18 Posted September 21, 2009 Author Share Posted September 21, 2009 What if I do: $sql = mysql_query("SELECT e_mails FROM mail_useage WHERE date=date("Y-m-d", TIME() - 18000)"); Now how do I do it? Quote Link to comment Share on other sites More sharing options...
shane18 Posted September 21, 2009 Author Share Posted September 21, 2009 hello... is what i asked above possible? 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.