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
pull/2/head
Christian Boltz 13 years ago
parent 736074ec12
commit f503ba1098

@ -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;
}
}

Loading…
Cancel
Save