php man page for sqlite_fetch_single

Query: sqlite_fetch_single

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

SQLITE_FETCH_SINGLE(3)													    SQLITE_FETCH_SINGLE(3)

sqlite_fetch_single - Fetches the first column of a result set as a string

SYNOPSIS
string sqlite_fetch_single (resource $result, [bool $decode_binary = true])
DESCRIPTION
Object oriented style (method): string SQLiteResult::fetchSingle ([bool $decode_binary = true]) string SQLiteUnbuffered::fetchSingle ([bool $decode_binary = true]) sqlite_fetch_single(3) is identical to sqlite_fetch_array(3) except that it returns the value of the first column of the rowset. This is the most optimal way to retrieve data when you are only interested in the values from a single column of data.
PARAMETERS
o $result - The SQLite result resource. This parameter is not required when using the object-oriented method. o $decode_binary -When the $decode_binary parameter is set to TRUE (the default), PHP will decode the binary encoding it applied to the data if it was encoded using the sqlite_escape_string(3). You should normally leave this value at its default, unless you are interoperating with databases created by other sqlite capable applications.
RETURN VALUES
Returns the first column value, as a string.
EXAMPLES
Example #1 A sqlite_fetch_single(3) example <?php if ($dbhandle = sqlite_open('mysqlitedb', 0666, $sqliteerror)) { $sql = "SELECT id FROM sometable WHERE id = 42"; $res = sqlite_query($dbhandle, $sql); if (sqlite_num_rows($res) > 0) { echo sqlite_fetch_single($res); // 42 } sqlite_close($dbhandle); } ?>
SEE ALSO
sqlite_fetch_array(3). PHP Documentation Group SQLITE_FETCH_SINGLE(3)
Related Man Pages
sqlite_changes(3) - php
sqlite_current(3) - php
sqlite_fetch_single(3) - php
sqlite_num_rows(3) - php
sqlitedatabase.query(3) - php
Similar Topics in the Unix Linux Community
how to retrieve sql result to unix....
scripting issue
find and replace a string in a file without the use of temp file
how to output data with only an specific string on it
Hot to retrieve *.sql file names which we refer in .sh file.