|
Previous Page |
Solar_Sql_Adapter_Sqlite |
Next Page |
quote()
public
string
quote (
mixed $val
)
Safely quotes a value for an SQL statement.
Inherited from Solar_Sql_Adapter.
Parameters
- (mixed)
$val: The value to quote.
Returns
- (string) An SQL-safe quoted value (or a string of separated-and-quoted values).
Description
Safely quotes a value for an SQL statement.
If an array is passed as the value, the array values are quoted and then returned as a comma-separated string; this is useful for generating IN() lists.
<?php
$sql = Solar::factory('Solar_Sql');
$safe = $sql->quote('foo"bar"');
// $safe == "'foo\"bar\"'"
$safe = $sql->quote(array('one', 'two', 'three'));
// $safe == "'one', 'two', 'three'"
?> Local
- Overview
- Constants
- Properties
- Methods
- __construct()
- __destruct()
- _checkIdentifier()
- _createSequence()
- _dropIndex()
- _dropSequence()
- _dsn()
- _exception()
- _fetchTableCols()
- _fetchTableList()
- _getCacheKey()
- _getTypeSizeScope()
- _modAutoincPrimary()
- _modIndexName()
- _modSelect()
- _modSequenceName()
- _nextSequence()
- _postConnect()
- _select()
- _sqlColdef()
- _sqlCreateTable()
- _sqlSelect()
- addColumn()
- apiVersion()
- begin()
- commit()
- connect()
- createIndex()
- createSequence()
- createTable()
- delete()
- disconnect()
- dropColumn()
- dropIndex()
- dropSequence()
- dropTable()
- dump()
- fetchAll()
- fetchAssoc()
- fetchCol()
- fetchOne()
- fetchPairs()
- fetchPdo()
- fetchSql()
- fetchTableCols()
- fetchTableList()
- fetchValue()
- getPdo()
- getProfile()
- insert()
- lastInsertId()
- locale()
- nextSequence()
- query()
- quote()
- quoteInto()
- quoteMulti()
- rollback()
- setProfiling()
- update()