aboutsummaryrefslogtreecommitdiff
path: root/utils/remove.php
diff options
context:
space:
mode:
authorGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-11-02 17:41:36 +0100
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-11-02 17:43:25 +0100
commit5e08b8f88850f6ca56b57da923c434b7f264e33f (patch)
tree77ce0be7e98cebfb159a1398ab7b908d82883cfe /utils/remove.php
parent2f8034bf4cb919391de7e277c89540113ed3ec69 (diff)
downloadbuildroot-test-5e08b8f88850f6ca56b57da923c434b7f264e33f.tar.gz
buildroot-test-5e08b8f88850f6ca56b57da923c434b7f264e33f.tar.bz2
utils,web: migrate to PHP 7
Main changes are: - Use mysqli API instead of mysql API - Use preg_match() instead of ereg() Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'utils/remove.php')
-rwxr-xr-xutils/remove.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/remove.php b/utils/remove.php
index 07a7fd3..289a617 100755
--- a/utils/remove.php
+++ b/utils/remove.php
@@ -1,4 +1,4 @@
-#!/usr/bin/env php5
+#!/usr/bin/env php
<?php
/*
* Remove one build failure from the database
@@ -23,12 +23,12 @@ if ($ret == FALSE) {
echo "FAILED\n";
exit(1);
}
-if (mysql_num_rows($ret) != 1) {
+if (mysqli_num_rows($ret) != 1) {
echo "NOT FOUND\n";
exit(1);
}
-$c = mysql_fetch_object($ret);
+$c = mysqli_fetch_object($ret);
$id = $c->id;
echo " $id\n";
@@ -42,7 +42,7 @@ if (!is_writable($path)) {
echo "Removing from results_config...";
-$sql = "delete from results_config where resultid=" . $id;
+$sql = "delete from symbol_per_result where result_id=" . $id;
$ret = $db->query($sql);
if ($ret == FALSE) {
echo "FAILED\n";