Initial DB scripts.
diff --git a/includes/bugzillaConnectUtils.php b/includes/bugzillaConnectUtils.php
index e07e428..77eb02f 100644
--- a/includes/bugzillaConnectUtils.php
+++ b/includes/bugzillaConnectUtils.php
@@ -27,6 +27,18 @@
global $tsProductId, $tsProductName;
echo "looking up product ID</br>";
$result = mysql_query("SELECT id, name FROM products WHERE name=\"Tigerstripe\"", $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;
+ }
+
while($row = mysql_fetch_assoc($result)) {
$tsProductId = $row['id'];
$tsProductName = $row['name'];
@@ -34,7 +46,7 @@
// all the milestones
global $milestones;
- $result = mysqli_query("SELECT value FROM milestones WHERE product_id = \"$tsProductId\" ORDER BY sortkey,value DESC", $dbh);
+ $result = mysql_query("SELECT value FROM milestones WHERE product_id = \"$tsProductId\" ORDER BY sortkey,value DESC", $dbh);
while($row = mysql_fetch_assoc($result)) {
$milestones[] = $row['value'];
}