previousHTML_QuickForm_select::loadDbResult() (Previous) (Next) HTML_QuickForm_select::setMultiple()next

View this page in Last updated: Sun, 18 Oct 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

HTML_QuickForm_select::loadQuery()

HTML_QuickForm_select::loadQuery() – Interroge une base de données et charge les options depuis le résultat

Synopsis

require_once 'HTML/QuickForm/select.php';

mixed HTML_QuickForm_select::loadQuery ( mixed &$conn , string $sql , string $textCol = = null , string $valueCol = = null , mixed $values = = null )

Description

Si aucun nom de colonne n'est spécifié, les deux premières colonnes du résultat sont utilisées en tant que texte et valeur, respectivement.

Parameter

mixed &$conn

Soit une connexion DB existante, soit un DSN valide

string $sql

Requête SQL

string $textCol

(optionnel) Nom de la colonne à utiliser en tant que texte dans l'OPTION

string $valueCol

(optionnel) Nom de la colonne à utiliser en tant que valeur dans l'OPTION

mixed $values

(optionnel) Tableau ou chaîne délimitée par une virgule de valeurs

Throws

Lance une exception PEAR_Error si une erreur survient.

Note

Disponible depuis la version 1.1.

This function can not be called statically.

previousHTML_QuickForm_select::loadDbResult() (Previous) (Next) HTML_QuickForm_select::setMultiple()next

Download Documentation Last updated: Sun, 18 Oct 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.