[ Index ]
 

Code source de Horde 3.1.3

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/lib/Horde/ -> SQL.php (sommaire)

(pas de description)

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

Définit 1 class

Horde_SQL:: (7 méthodes):
  buildClause()
  escapePrepare()
  readBlob()
  insertBlob()
  updateBlob()
  updateValues()
  insertValues()


Classe: Horde_SQL  - X-Ref

This is a utility class, every method is static.

$Horde: framework/SQL/SQL.php,v 1.30.2.17 2006/04/19 03:49:49 ben Exp $

Copyright 1999-2006 Chuck Hagenbuch <chuck@horde.org>
Copyright 2005-2006 Jan Schneider <jan@horde.org>

See the enclosed file COPYING for license information (LGPL).  If you did
not receive this file, see http://www.fsf.org/copyleft/lgpl.html.

buildClause(&$dbh, $lhs, $op, $rhs, $bind = false)   X-Ref
Returns a boolean expression using the specified operator. Uses
database-specific casting, if necessary.

param: DB $dbh        The PEAR::DB database object.
param: string $lhs    The column or expression to test.
param: string $op     The operator.
param: string $rhs    The comparison value.
param: boolean $bind  If true, the method returns the query and a list
return: string  The SQL test fragment.

escapePrepare($query)   X-Ref
Escapes all characters in a string that are placeholders for the
prepare/execute methods of the DB package.

param: string $query  A string to escape.
return: string  The correctly escaped string.

readBlob(&$dbh, $table, $field, $criteria)   X-Ref
Pas de description

insertBlob(&$dbh, $table, $field, $data, $attributes)   X-Ref
Pas de description

updateBlob(&$dbh, $table, $field, $data, $where, $alsoupdate)   X-Ref
Pas de description

updateValues(&$dbh, $values)   X-Ref
Build an SQL SET clause.

This function takes an array in the form column => value and returns
an SQL SET clause (without the SET keyword) with the values properly
quoted.  For example, the following:

array('foo' => 1,
'bar' => 'hello')

would result in the fragment:

foo = 1, bar = 'hello'

param: DB $dbh        The PEAR::DB database object.
param: array $values  The array of column => value pairs.
return: string  The SQL SET fragment.

insertValues(&$dbh, $values)   X-Ref
Build an SQL INSERT/VALUES clause.

This function takes an array in the form column => value and returns
an SQL fragment specifying the column names and insert values, with
the values properly quoted.  For example, the following:

array('foo' => 1,
'bar' => 'hello')

would result in the fragment:

( foo, bar ) VALUES ( 1, 'hello' )

param: DB $dbh        The PEAR::DB database object.
param: array $values  The array of column => value pairs.
return: string  The SQL fragment.



Généré le : Sun Feb 25 18:01:28 2007 par Balluche grâce à PHPXref 0.7