Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 9th, 2012  |  syntax: None  |  size: 0.62 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Save date/time from PHP to SQL
  2. INSERT INTO tbl_reviews (headline, text, date, rating, product_id, username)
  3.             value (:headline, :text, :date, :rating, :product_id, :username)
  4.        
  5. INSERT INTO tbl_reviews (headline, text, date, rating, product_id, username)
  6.             value (:headline, :text, now(), :rating, :product_id, :username)
  7.        
  8. $timestamp = date('Y-m-d H:i:s');
  9.        
  10. INSERT INTO tbl_reviews (headline, text, date, rating, product_id, username)
  11. INSERT INTO tbl_reviews ('$headline', '$text', CURDATE(), '$rating', '$product_id', '$username');
  12.        
  13. date_default_timezone_set('US/Eastern');
  14. $cur_date=date("Y-m-d");