Changeset 2308 for trunk/include/functions.inc.php
- Timestamp:
- Apr 25, 2008, 3:00:39 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions.inc.php
r2299 r2308 565 565 } 566 566 567 // here we ask the database the current date and time, and we extract568 // {year, month, day} from the current date. We could do this during the569 // insert query with a CURDATE(), CURTIME(), DATE_FORMAT(CURDATE(), '%Y')570 // ... but I (plg) think it would cost more than a double query and a PHP571 // extraction.572 $query = '573 SELECT CURDATE(), CURTIME()574 ;';575 list($curdate, $curtime) = mysql_fetch_row(pwg_query($query));576 577 list($curyear, $curmonth, $curday) = explode('-', $curdate);578 list($curhour) = explode(':', $curtime);579 580 567 $query = ' 581 568 INSERT INTO '.HISTORY_TABLE.' … … 597 584 VALUES 598 585 ( 599 \''.$curdate.'\',600 \''.$curtime.'\',601 '.$curyear.',602 '.$curmonth.',603 '.$curday.',604 '.$curhour.',586 CURDATE(), 587 CURTIME(), 588 YEAR( CURDATE() ), 589 MONTH( CURDATE() ), 590 DAYOFMONTH( CURDATE() ), 591 HOUR( CURTIME() ), 605 592 '.$user['id'].', 606 593 \''.$_SERVER['REMOTE_ADDR'].'\',
Note: See TracChangeset
for help on using the changeset viewer.