FreeMED Opensource EMR/PM Software |
PHP.sqlSQL wrapper class Summary
sql constructorParameters
data_seek
Moves the result position pointer to a certain position. This is just a wrapper for sql->seek Parameters
last_record
Returns the last SERIAL field to be added to a database. A result and/or table name may be needed, depending on the database engine that is being used. Parameters
ReturnsInteger, value of last SERIAL column set. num_rows
Get number of rows in a result Parameters
ReturnsInteger, number of rows in a result results
Determine if any results were generated from the specified query Parameters
ReturnsBoolean, whether there are any results seek
Moves the result position pointer to a certain position. Parameters
create_table_query
SQL query wrapper for creating an SQL table definition Parameters
ReturnsSQL table definition query text insert_query
SQL query wrapper for SQL INSERT command Parameters
ReturnsSQL query text update_query
SQL query wrapper for SQL UPDATE command Parameters
ReturnsSQL query text select_record_query
SQL query wrapper for simple SELECT queries Parameters
ReturnsSQL query text distinct_values
Produce a list of distinct values for an SQL table field Parameters
ReturnsArray of distinct values for the selected field |
Moves the result position pointer to a certain position.
function data_seek ( $result, $pos )
SQL database query execute with database selection
function db_query ( $database, $query )
Returns an associative array for the next table row of an SQL result.
function fetch_array ( $result )
Returns the last SERIAL field to be added to a database.
function last_record ( $result = NULL, $table = NULL )
Get number of rows in a result
function num_rows ( $result )
Execute an SQL query using the current SQL engine
function query ( $query )
Determine if any results were generated from the specified query
function results ( $result )
Moves the result position pointer to a certain position.
function seek ( $result, $pos )
SQL query wrapper for creating an SQL table definition
function create_table_query ( $table, $values, $keys = NULL )
SQL query wrapper for dropping a table
function drop_table_query ( $table )
SQL query wrapper for SQL INSERT command
function insert_query ( $table, $values )
SQL query wrapper for SQL UPDATE command
function update_query ( $table, $values, $where_var )
SQL query wrapper for simple SELECT queries
function select_record_query ( $table, $criteria, $fields = NULL )
SQL wrapper for field number count
function num_fields ( $res )
Produce a list of distinct values for an SQL table field
function distinct_values ( $table, $field, $where = NULL )