[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/includes/ -> database.mysqli.inc (summary)

(no description)

File Size: 378 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 1 file
 includes/database.mysql-common.inc

Defines 18 functions

  db_status_report()
  db_version()
  db_connect()
  _db_query()
  db_fetch_object()
  db_fetch_array()
  db_result()
  db_error()
  db_affected_rows()
  db_query_range()
  db_query_temporary()
  db_encode_blob()
  db_decode_blob()
  db_escape_string()
  db_lock_table()
  db_unlock_tables()
  db_table_exists()
  db_column_exists()

Functions
Functions that are not part of a class:

db_status_report($phase)   X-Ref
Report database status.


db_version()   X-Ref
Returns the version of the database server currently in use.

return: Database server version

db_connect($url)   X-Ref
Initialise a database connection.

Note that mysqli does not support persistent connections.

_db_query($query, $debug = 0)   X-Ref
Helper function for db_query().


db_fetch_object($result)   X-Ref
Fetch one result row from the previous query as an object.

param: $result
return:

db_fetch_array($result)   X-Ref
Fetch one result row from the previous query as an array.

param: $result
return:

db_result($result)   X-Ref
Return an individual result field from the previous query.

Only use this function if exactly one field is being selected; otherwise,
use db_fetch_object() or db_fetch_array().

param: $result
return:

db_error()   X-Ref
Determine whether the previous query caused an error.


db_affected_rows()   X-Ref
Determine the number of rows changed by the preceding query.


db_query_range($query)   X-Ref
Runs a limited-range query in the active database.

Use this as a substitute for db_query() when a subset of the query is to be
returned.
User-supplied arguments to the query should be passed in as separate parameters
so that they can be properly escaped to avoid SQL injection attacks.

param: $query
param: ...
param: $from
param: $count
return:

db_query_temporary($query)   X-Ref
Runs a SELECT query and stores its results in a temporary table.

Use this as a substitute for db_query() when the results need to stored
in a temporary table. Temporary tables exist for the duration of the page
request.
User-supplied arguments to the query should be passed in as separate parameters
so that they can be properly escaped to avoid SQL injection attacks.

Note that if you need to know how many results were returned, you should do
a SELECT COUNT(*) on the temporary table afterwards. db_affected_rows() does
not give consistent result across different database types in this case.

param: $query
param: ...
param: $table
return:

db_encode_blob($data)   X-Ref
Returns a properly formatted Binary Large Object value.

param: $data
return:

db_decode_blob($data)   X-Ref
Returns text from a Binary Large OBject value.

param: $data
return:

db_escape_string($text)   X-Ref
Prepare user input for use in a database query, preventing SQL injection attacks.


db_lock_table($table)   X-Ref
Lock a table.


db_unlock_tables()   X-Ref
Unlock all locked tables.


db_table_exists($table)   X-Ref
Check if a table exists.

param: $table
return:

db_column_exists($table, $column)   X-Ref
Check if a column exists in the given table.

param: $table
param: $column
return:



Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7