|
Previous Page |
Solar_Sql_Adapter_Mysql |
Next Page |
quoteInto()
public
mixed
quoteInto (
string $txt,
mixed $val
)
Quotes a value and places into a piece of text at a placeholder.
Inherited from Solar_Sql_Adapter.
Parameters
- (string)
$txt: The text with a placeholder. - (mixed)
$val: The value to quote.
Returns
- (mixed) An SQL-safe quoted value (or string of separated values) placed into the orignal text.
Description
Quotes a value and places into a piece of text at a placeholder.
The placeholder is a question-mark; all placeholders will be replaced with the quoted value. For example ...
<?php
$sql = Solar::factory('Solar_Sql');
$text = "WHERE date < ?";
$date = "2005-01-02";
$safe = $sql->quoteInto($text, $date);
// $safe == "WHERE date < '2005-01-02'"
?> Local
- Overview
- Constants
- Properties
- Methods
- __construct()
- __destruct()
- _addProfile()
- _bind()
- _buildDsn()
- _checkIdentifier()
- _createSequence()
- _dropIndex()
- _dropSequence()
- _exception()
- _fetchTableCols()
- _fetchTableList()
- _getCacheKey()
- _getDefault()
- _getTypeSizeScope()
- _modAutoincPrimary()
- _modIndexName()
- _modSelect()
- _modSequenceName()
- _nextSequence()
- _postConnect()
- _prepare()
- _quoteName()
- _quoteNamesIn()
- _select()
- _setDsn()
- _setup()
- _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()
- getCache()
- getCacheKeyPrefix()
- getPdo()
- getProfile()
- insert()
- lastInsertId()
- locale()
- nextSequence()
- query()
- quote()
- quoteInto()
- quoteMulti()
- quoteName()
- quoteNamesIn()
- rollback()
- setCache()
- setCacheKeyPrefix()
- setProfiling()
- update()