Changeset 6579
- Timestamp:
- Jun 22, 2010, 11:01:47 PM (14 years ago)
- Location:
- branches/2.1
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.1/admin/stats.php
r6464 r6579 117 117 SELECT 118 118 date, 119 hour(time)AS hour,119 '.pwg_db_get_hour('time').' AS hour, 120 120 MAX(id) AS max_id, 121 121 COUNT(*) AS nb_pages -
branches/2.1/include/dblayer/functions_mysql.inc.php
r5982 r6579 581 581 } 582 582 583 function pwg_db_get_hour($date) 584 { 585 return 'hour('.$date.')'; 586 } 587 583 588 function pwg_db_get_date_YYYYMM($date) 584 589 { -
branches/2.1/include/dblayer/functions_pdo-sqlite.inc.php
r6464 r6579 47 47 48 48 $link->sqliteCreateFunction('now', 'pwg_now', 0); 49 $link->sqliteCreateFunction('hour', 'pwg_hour', 1);50 49 $link->sqliteCreateFunction('unix_timestamp', 'pwg_unix_timestamp', 0); 51 50 $link->sqliteCreateFunction('md5', 'md5', 1); … … 503 502 } 504 503 504 function pwg_db_get_hour($date) 505 { 506 return 'strftime(\'%H\', '.$date.')'; 507 } 508 509 505 510 function pwg_db_get_date_YYYYMM($date) 506 511 { … … 572 577 } 573 578 574 function pwg_hour($datetime)575 {576 return strftime('%H', $datetime);577 }578 579 579 function pwg_unix_timestamp() 580 580 { -
branches/2.1/include/dblayer/functions_pgsql.inc.php
r6511 r6579 545 545 } 546 546 547 function pwg_db_get_hour($date) 548 { 549 return 'EXTRACT(HOUR FROM '.$date.')'; 550 } 551 547 552 function pwg_db_get_date_YYYYMM($date) 548 553 { -
branches/2.1/include/dblayer/functions_sqlite.inc.php
r6464 r6579 56 56 57 57 $link->createFunction('now', 'pwg_now', 0); 58 $link->createFunction('hour', 'pwg_hour', 1);59 58 $link->createFunction('unix_timestamp', 'pwg_unix_timestamp', 0); 60 59 $link->createFunction('md5', 'md5', 1); … … 515 514 } 516 515 516 function pwg_db_get_hour($date) 517 { 518 return 'strftime(\'%H\', '.$date.')'; 519 } 520 517 521 function pwg_db_get_date_YYYYMM($date) 518 522 { … … 584 588 } 585 589 586 function pwg_hour($datetime)587 {588 return strftime('%H', $datetime);589 }590 591 590 function pwg_unix_timestamp() 592 591 {
Note: See TracChangeset
for help on using the changeset viewer.