Skip to content

Commit

Permalink
Merge pull request #20 from takashisite/hotfix/fixed-edit-pid
Browse files Browse the repository at this point in the history
bugfixed pid_commit.php
  • Loading branch information
surfrock66 authored May 17, 2017
2 parents 5a7d7d6 + b00d97b commit 436318b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/pid_commit.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
//update the values
$query = "UPDATE $db_name.$db_keys_table SET ".quote_name($field_name)." = ".quote_value($val)." WHERE id = ".quote_value($id);
echo "\n$query\n";
mysqli_query($query) || die(mysqli_error($con));
mysqli_query($con,$query) || die(mysqli_error($con));
if($field_name == 'type') {
$query = "ALTER TABLE $db_name.$db_table MODIFY ".quote_name($id)." ".mysqli_real_escape_string($con, $val)." NOT NULL DEFAULT '0'";
echo $query;
mysqli_query($query) || die(mysqli_error($con));
mysqli_query($con,$query) || die(mysqli_error($con));
}
echo "Updated";
} else {
Expand Down

0 comments on commit 436318b

Please sign in to comment.