You've already forked postfixadmin
mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2025-08-09 05:02:44 +03:00
functions.inc.php,
- db_delete(): if no row was deleted, return 0 (not true) This should not affect any existing code, but makes more sense for future usage. - whitespace changes in db_delete() git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1035 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
@@ -1713,13 +1713,11 @@ function db_delete ($table,$where,$delete)
|
||||
$table = table_by_key($table);
|
||||
$query = "DELETE FROM $table WHERE " . escape_string($where) . "='" . escape_string($delete) . "'";
|
||||
$result = db_query ($query);
|
||||
if ($result['rows'] >= 1)
|
||||
{
|
||||
|
||||
if ($result['rows'] >= 1) {
|
||||
return $result['rows'];
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user