PHP_Framework

Wh1t3projects' PHP framework. Small PHP framework for building web apps and websites

View the Project on GitHub

Syntax: SQL_delete(string $tableName, string $columnToMatch, string $valueToMatch [, string $addtionalArguments])

Delete row(s) from a table that match the given criteria


Parameters

$tableName
The table to delete row(s) from

$columnToMatch
The column to search a match in

$valueToMatch
The value to match

Optionnal $additionalArguments
Addtional arguments to append to the query
Warning: Make sure that the specified arguments works for all types of SQL servers. Otherwise, errors may occur if a different SQL driver than expected is used. One way to work around this kind of issue is to adapt your arguments based on the currently loaded driver


Return values

TRUE if the operation was successful. FALSE if an error occurred.


Example:

Delete any row with ‘test’ as their value in the column ‘users’
SQL_delete('aTable','users','test');