shane18 Posted September 21, 2009 Share Posted September 21, 2009 I understand how to do: $sql = "SELECT e_mails FROM mail_useage WHERE date='".date("Y-m-d", TIME() - 18000)."'"; $sql2 = mysql_query($sql); but how do i skip the extra step and put it all into one without a error... like *I haven't tested this, its just how I can think of how to do it.. please help me figure out how to do this* $sql = mysql_query("SELECT e_mails FROM mail_useage WHERE date=date("Y-m-d", TIME() - 18000)"); Link to comment https://forums.phpfreaks.com/topic/175036-using-functions-inside-a-mysql-query-please-help/ Share on other sites More sharing options...
mikesta707 Posted September 21, 2009 Share Posted September 21, 2009 $query = mysql_query("SELECT e_mails FROM mail_useage WHERE date='".date("Y-m-d", TIME() - 18000)."'"); really all i did was copy your string and paste it inside the mysql_query parameter... Link to comment https://forums.phpfreaks.com/topic/175036-using-functions-inside-a-mysql-query-please-help/#findComment-922485 Share on other sites More sharing options...
shane18 Posted September 21, 2009 Author Share Posted September 21, 2009 IM A RETARD... omg thanks man.. i have a head ache today.. not thinkin straight Link to comment https://forums.phpfreaks.com/topic/175036-using-functions-inside-a-mysql-query-please-help/#findComment-922486 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.