summaryrefslogtreecommitdiff
path: root/maintenance/trivialCmdLine.php
blob: 2f12815fa17b6dd7796d597e6a5d9e42cff6cdbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
/**
 * @package MediaWiki
 * @subpackage Maintenance
 */

/** */
require_once( "commandLine.inc" );
# print "DB name: $wgDBname\n";
# print "DB user: $wgDBuser\n";
# print "DB password: $wgDBpassword\n";

print "This is an example command-line maintenance script.\n";

$dbr =& wfGetDB( DB_SLAVE );
$page = $dbr->tableName( 'page' );
$res = $dbr->query( "SELECT MAX(page_id) as m FROM $page" );
$row = $dbr->fetchObject( $res );
print "Max page_id: {$row->m}\n";

?>