Jump to content

[SOLVED] MySQL Query & Functions


shane18

Recommended Posts

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));

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.