NYCPHP Meetup

NYPHP.org

[nycphp-talk] Need mini-code review

Phil Powell soazine at erols.com
Tue Sep 30 00:31:26 EDT 2003


$sql = 'DELETE FROM nnet_produkt_bestilling ' .
          'WHERE nnet_produkt_placement > ' .
          'nnet_produkt_placement + \'' . date("Y-m-d H:i:s", time() + $maxCartTime) . '\'';

This is supposed to delete all rows in nnet_produkt_bestilling whose value in the field nnet_produkt_placement is more than $maxCartTime seconds old ($maxCartTime, in this case = 86400 seconds, or 24 hours).  I am unsure if this is the correct syntax using mySQL to do such an action upon a DATETIME field column datatype, so if someone could look that over and see how far out of the ballpark I really am I'd appreciate it.

Thanx
Phil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20030930/92a2d458/attachment.html>


More information about the talk mailing list