WIKINDX METHODS

Method:
delete()

Class:
SQL

Method Call:
include_once("core/sql/SQL.php");
$db = new SQL();
$db->delete(STRING: $table, [STRING: $condition]);

Description:
Delete rows from a database table. NB. If there is no $condition, all rows within that table will be deleted.

Usage:

For example (assuming the database object exists within a class as $this->db):

	$table = "WKX_resource";
	$condition = "WHERE $id = " $this->db->tidyInput(666);
	$this->db->delete($table, $condition);
This will delete the row identifed by id='666' from the WKX_resource table.

WIKINDX home      WIKINDX usage      WIKINDX classes