blob: 7e26e9bc7f63e7aa165c96588230182bf767aa47 [file] [log] [blame]
<html>
<body>
<?php
require_once "/home/data/httpd/eclipse-php-classes/system/dbconnection_bugs_ro.class.php";
# Connect to database
/*
$sqlquery = "SELECT
fieldid,
name
FROM
fielddefs";
*/
$sqlquery = "SELECT
BUG.bug_id,
BUG.creation_ts
FROM
bugs AS BUG
INNER JOIN products AS PROD ON PROD.id = BUG.product_id
WHERE
PROD.name='Web Tools'
ORDER BY
BUG.creation_ts";
$sqlquery2 = "SELECT
BUG_ACT.bug_id,
BUG_ACT.bug_when,
BUG_ACT.added
FROM
bugs_activity AS BUG_ACT
INNER JOIN bugs AS BUG ON BUG.bug_id = BUG_ACT.bug_id
INNER JOIN products AS PROD ON PROD.id = BUG.product_id
INNER JOIN fielddefs AS FIELD ON FIELD.fieldid = BUG_ACT.fieldid
WHERE
PROD.name='Web Tools'
AND FIELD.fieldid=8
AND (BUG_ACT.added='RESOLVED' OR BUG_ACT.added='REOPENED')
ORDER BY
BUG_ACT.bug_when";
$dbc = new DBConnectionBugs();
$dbh = $dbc->connect();
$rs = mysql_query($sqlquery, $dbh);
if(mysql_errno($dbh) > 0)
{
echo "There was an error processing this request".
# For debugging purposes - don't display this stuff in a production page.
# echo mysql_error($dbh);
# Mysql disconnects automatically, but I like my disconnects to be explicit.
$dbc->disconnect();
exit;
}
$i = 1;
while($myrow = mysql_fetch_assoc($rs))
{
//echo $myrow['fieldid'] . " " . $myrow['name'] . "<br>";
echo $i . ". " . $myrow['bug_id'] . " " . $myrow['creation_ts'] . "<br>";
$i++;
}
echo "<br><br>--------------------------------------------------------------------------------<br><br>";
$rs = mysql_query($sqlquery2, $dbh);
if (mysql_errno($dbh) > 0)
{
echo "There was an error processing this request".
# For debugging purposes - don't display this stuff in a production page.
# echo mysql_error($dbh);
# Mysql disconnects automatically, but I like my disconnects to be explicit.
$dbc->disconnect();
exit;
}
$i = 1;
while($myrow = mysql_fetch_assoc($rs))
{
echo $i . ". " . $myrow['bug_id'] . " " . $myrow['bug_when'] . "<br>";
if ($myrow['added'] == "REOPENED")
{
$i--;
}
else
{
$i++;
}
}
$dbc->disconnect();
$rs = null;
$dbh = null;
$dbc = null;
?>
</body>
</html>