WIKINDX METHODS

Method:
updateNull()

Class:
SQL

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

Description:
Execute an UPDATE statement setting the required fields to NULL.

$setArray is an array where each field is a field within $table that is to be set to NULL.

Do not add backticks, single-quotes etc. - the SQL class will do this automatically depending on the database we're connected to.

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

	$table = "WKX_resource";
	$setArray = array(
		"title",
		"subtitle",
		);
	$condition = "WHERE " . $this->db->formatField('id') . "=" . $this->db->tidyInput(666);
	$this->db->updateNull($table, $setArray, $condition);

WIKINDX home      WIKINDX usage      WIKINDX classes