| <?php |
| /******************************************************************************* |
| * Copyright (c) 2011 Eclipse Foundation and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Wayne Beaton (Eclipse Foundation)- initial API and implementation |
| *******************************************************************************/ |
| |
| header("Content-type: text/plain"); |
| |
| $user="dashboard"; |
| require_once( "dbpassword.php" ); |
| $database="dashboard"; |
| $_dbh = mysql_connect('dashdbhost',$user,$password); |
| mysql_select_db( $database, $_dbh ); |
| |
| $sql = "select yearmonth as period, count(distinct login) as count from commits group by yearmonth"; |
| |
| $result = mysql_query($sql,$_dbh); |
| while($row = mysql_fetch_assoc($result)) { |
| $period = $row['period']; |
| $count = $row['count']; |
| |
| echo "$period, $count\n"; |
| } |
| |
| ?> |