[ Index ]
 

Code source de Drupal 5.3

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

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

(pas de description)

Poids: 424 lignes (14 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 20 fonctions

  db_status_report()
  db_version()
  db_connect()
  _db_query()
  db_fetch_object()
  db_fetch_array()
  db_num_rows()
  db_result()
  db_error()
  db_next_id()
  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_distinct_field()

Fonctions
Fonctions qui ne font pas partie d'une Classe:

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_num_rows($result)   X-Ref
Determine how many result rows were found by the preceding query.

param: $result
return:

db_result($result, $row = 0)   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
param: $row
return:

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


db_next_id($name)   X-Ref
Return a new unique ID in the given sequence.

For compatibility reasons, Drupal does not use auto-numbered fields in its
database tables. Instead, this function is used to return a new unique ID
of the type requested. If necessary, a new sequence with the given name
will be created.

Note that the table name should be in curly brackets to preserve compatibility
with table prefixes. For example, db_next_id('{node}_nid');

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_num_rows() and
db_affected_rows() do 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.


db_distinct_field($table, $field, $query)   X-Ref
Wraps the given table.field entry with a DISTINCT(). The wrapper is added to
the SELECT list entry of the given query and the resulting query is returned.
This function only applies the wrapper if a DISTINCT doesn't already exist in
the query.

param: $table Table containing the field to set as DISTINCT
param: $field Field to set as DISTINCT
param: $query Query to apply the wrapper to
return: SQL query with the DISTINCT wrapper surrounding the given table.field.



Généré le : Fri Nov 30 16:20:15 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics