| Manuál PHP | ||
|---|---|---|
| Předcházející | Další | |
pg_convert
(PHP 4 >= 4.3.0, PHP 5)
pg_convert -- Convert associative array values into suitable for SQL statementPopis
array pg_convert ( resource connection, string table_name, array assoc_array [, int options] )
pg_convert() checks and converts the values in
assoc_array into suitable values for use in a SQL
statement. Precondition for pg_convert() is the
existence of a table table_name which has at least
as many columns as assoc_array has elements. The
fieldnames in table_name must match the indices in
assoc_array and the corresponding datatypes must be
compatible. Returns an array with the converted values on success, FALSE
otherwise.
Poznámka: If there are boolean fields in
table_namedon't use the constant TRUE inassoc_array. It will be converted to the string 'TRUE' which is no valid entry for boolean fields in PostgreSQL. Use one of t, true, 1, y, yes instead.
| Varování |
Tato funkce je EXPERIMENTÁLNÍ. Chování této funkce, její název a všechno ostatní, co je zde zdokumentováno, se v budoucích verzích PHP může BEZ OHLÁŠENÍ změnit. Berte to v úvahu a používejte tuto funkci na vlastní nebezpečí. |
Seznam parametrů
connectionPostgreSQL database connection resource.
table_nameName of the table against which to convert types.
assoc_arrayData to be converted.
optionsAny number of PGSQL_CONV_IGNORE_DEFAULT, PGSQL_CONV_FORCE_NULL or PGSQL_CONV_IGNORE_NOT_NULL, combined.
| Předcházející | Domů | Další |
| pg_connection_status | Nahoru |