NYCPHP Meetup

NYPHP.org

[nycphp-talk] Need mini-code review

Donald J. Organ IV dorgan at optonline.net
Tue Sep 30 01:34:36 EDT 2003


yes i know but you never know, sum things just work because they look different. :o)
  ----- Original Message ----- 
  From: Phil Powell 
  To: NYPHP Talk 
  Sent: Tuesday, September 30, 2003 1:28 AM
  Subject: Re: [nycphp-talk] Need mini-code review


  Thanx, but I don't understand the difference between yours and mine, they look identical.

  Phil
    ----- Original Message ----- 
    From: Donald J. Organ IV 
    To: NYPHP Talk 
    Sent: Tuesday, September 30, 2003 12:58 AM
    Subject: Re: [nycphp-talk] Need mini-code review


    try this:

    $sql = "DELETE FROM nnet_produkt_bestilling WHERE nnet_produkt_placement > nnet_produkt_placement + '' . date("Y-m-d H:i:s", time() + $maxCartTime);
      ----- Original Message ----- 
      From: Phil Powell 
      To: NYPHP Talk 
      Sent: Tuesday, September 30, 2003 12:31 AM
      Subject: [nycphp-talk] Need mini-code review


      $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


--------------------------------------------------------------------------


      _______________________________________________
      talk mailing list
      talk at lists.nyphp.org
      http://lists.nyphp.org/mailman/listinfo/talk



----------------------------------------------------------------------------


    _______________________________________________
    talk mailing list
    talk at lists.nyphp.org
    http://lists.nyphp.org/mailman/listinfo/talk



------------------------------------------------------------------------------


  _______________________________________________
  talk mailing list
  talk at lists.nyphp.org
  http://lists.nyphp.org/mailman/listinfo/talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20030930/1da07f68/attachment.html>


More information about the talk mailing list