TruncateQuery Class
Represent the query to remove all contents of a table
$truncated = $db->truncate('users')->result();
Constructor
Item Index
Methods
__toString
()
String
Represent the query as a SQL statement
Returns:
String:
The query in SQL string form
limit
(
Query
-
lengthOrIndex
-
[duration=null]
The limit for query
Parameters:
-
lengthOrIndex
IntEither the single limit number or index, duration
-
[duration=null]
Int optionalHow many rows to fetch
Returns:
Query:
The instance of this query
orderBy
(
Query
-
field
-
[order='asc']
How to order the results by
Parameters:
Returns:
Query:
The instance of this query
prepare
(
String
protected
-
value
Take an existing value we're about to input and escape it, if needed
Parameters:
-
value
StringA statement or sql property to evaluate
Returns:
String:
A string of an escaped, prepared SQL property
prepareField
(
String
protected
-
field
Take an existing field name we're about to input and
Parameters:
-
field
StringThe name of a field
Returns:
String:
A string of an escaped, prepared SQL field name