UNB Components Code Reference

UnbDatabase::QueryValue method

Executes an SQL statement and returns a single value.

public function UnbDatabase::QueryValue ($sql, $parameters = null);

Parameters

sql
(string) SQL statement
(PDOStatement) Already prepared statement
parameters  –  optional, default: null
(array) Parameters to be used in this SQL statement, null if no parameters are used.

Return value

the first record's first column, if successful, null if no record was fetched.

Exceptions thrown

UnbDatabaseException If the statement could not be prepared or executed.

Member of class: UnbDatabase

Implementation file: database.class.php, line 731

© 2010 Yves Goergen. UNB Components Homepage. Reference generated on 2010-03-07.