safe delete
From Textbook
Contents |
Description
array safe_delete ( string $table, string $where, boolean $debug = "" )
Delete rows (records) from the Textpattern database.
Parameters
- table
- Textpattern table name, without any installation-specific prefix
- where
- MySQL
WHEREstatement, without theWHEREkeyword - debug
- If true, dmp() the query even when global debug mode is off
Return Values
Returns TRUE on success or FALSE on failure.
Changelog
Examples
$ip = doSlash(gps('ip'));
if (safe_delete('txp_discuss_ipban', "ip = '$ip'")
echo "IP ban removed for $ip";




