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(): allow to specify additional conditions for the WHERE clause git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1285 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
@@ -1624,9 +1624,9 @@ function db_assoc ($result) {
|
||||
// Action: Deletes a row from a specified table
|
||||
// Call: db_delete (string table, string where, string delete)
|
||||
//
|
||||
function db_delete ($table,$where,$delete) {
|
||||
function db_delete ($table,$where,$delete,$additionalwhere='') {
|
||||
$table = table_by_key($table);
|
||||
$query = "DELETE FROM $table WHERE " . escape_string($where) . "='" . escape_string($delete) . "'";
|
||||
$query = "DELETE FROM $table WHERE " . escape_string($where) . "='" . escape_string($delete) . "' " . $additionalwhere;
|
||||
$result = db_query ($query);
|
||||
|
||||
if ($result['rows'] >= 1) {
|
||||
|
Reference in New Issue
Block a user