Changeset 2308
- Timestamp:
- Apr 25, 2008, 3:00:39 AM (16 years ago)
- Location:
- trunk/include
- Files:
-
- 2 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'].'\', -
trunk/include/functions_tag.inc.php
r2299 r2308 50 50 WHERE' 51 51 ).' 52 GROUP BY tag_id'; 52 GROUP BY tag_id 53 ORDER BY NULL'; 53 54 $tag_counters = simple_hash_from_query($query, 'tag_id', 'counter'); 54 55 … … 243 244 ORDER BY counter DESC 244 245 LIMIT 0,'.$max_tags; 246 } 247 else 248 { 249 $query .= ' 250 ORDER BY NULL'; 245 251 } 246 252
Note: See TracChangeset
for help on using the changeset viewer.