stats changes ported from 1.4
[lhc/web/wiklou.git] / maintenance / trivialCmdLine.php
1 <?php
2 /**
3 * @package MediaWiki
4 * @subpackage Maintenance
5 */
6
7 /** */
8 require_once( "commandLine.inc" );
9 # print "DB name: $wgDBname\n";
10 # print "DB user: $wgDBuser\n";
11 # print "DB password: $wgDBpassword\n";
12
13 print "This is an example command-line maintenance script.\n";
14
15 $dbr =& wfGetDB( DB_SLAVE );
16 $page = $dbr->tableName( 'page' );
17 $res = $dbr->query( "SELECT MAX(page_id) as m FROM $page" );
18 $row = $dbr->fetchObject( $res );
19 print "Max page_id: {$row->m}\n";
20
21 ?>