|
dolibarr 25.0.0-alpha
|
Class to drive a PostgreSQL database for Dolibarr. More...


Public Member Functions | |
| __construct ($type, $host, $user, $pass, $name='', $port=0, $forcenew=false) | |
| Constructor. | |
| convertSQLFromMysql ($line, $type='auto', $unescapeslashquot=false) | |
| Convert a SQL request in Mysql syntax to native syntax. | |
| select_db ($database) | |
Select a database PostgreSQL does not have an equivalent for mysql_select_db Only compare if the chosen DB is the one active on the connection. | |
| connect ($host, $login, $passwd, $name, $port=0, $forcenew=false) | |
| Connection to server. | |
| getVersion () | |
| Return version of database server. | |
| getDriverInfo () | |
| Return version of database client driver. | |
| close () | |
| Close database connection. | |
| query ($query, $usesavepoint=0, $type='auto', $result_mode=0) | |
| Convert request to PostgreSQL syntax, execute it and return the resultset. | |
| fetch_object ($resultset) | |
| Returns the current line (as an object) for the resultset cursor. | |
| fetch_array ($resultset) | |
| Return data as an array. | |
| fetch_row ($resultset) | |
| Return datas as an array. | |
| num_rows ($resultset) | |
| Return number of lines for result of a SELECT. | |
| affected_rows ($resultset) | |
| Return the number of rows in the result of a request INSERT, DELETE or UPDATE. | |
| free ($resultset=null) | |
| Free the last pointer resultset used by this connection. | |
| plimit ($limit=0, $offset=0) | |
| Define limits and offset of request. | |
| escape ($stringtoencode) | |
| Escape a string to insert data. | |
| escapeforlike ($stringtoencode) | |
| Escape a string to insert data into a like. | |
| ifsql ($test, $resok, $resko) | |
| Format a SQL IF. | |
| regexpsql ($subject, $pattern, $sqlstring=0) | |
| Format a SQL REGEXP. | |
| errno () | |
| Renvoie le code erreur generique de l'operation precedente. | |
| error () | |
| Renvoie le texte de l'erreur pgsql de l'operation precedente. | |
| last_insert_id ($table, $fieldid='rowid') | |
| Get last ID after an insert INSERT. | |
| encrypt ($fieldorvalue, $withQuotes=1) | |
| Encrypt sensitive data in database Warning: This function includes the escape and add the SQL simple quotes on strings. | |
| decrypt ($value) | |
| Decrypt sensitive data in database. | |
| DDLGetConnectId () | |
| Return connection ID. | |
| DDLCreateDb ($database, $charset='', $collation='', $owner='') | |
| Create a new database Do not use function xxx_create_db (xxx=mysql, ...) as they are deprecated We force to create database with charset this->forcecharset and collate this->forcecollate. | |
| DDLListTables ($database, $table='') | |
| List tables into a database. | |
| DDLListTablesFull ($database, $table='') | |
| List tables into a database. | |
| DDLInfoTable ($table) | |
| List information of columns in a table. | |
| DDLCreateTable ($table, $fields, $primary_key, $type, $unique_keys=null, $fulltext_keys=null, $keys=null) | |
| Create a table into database. | |
| DDLDropTable ($table) | |
| Drop a table into database. | |
| DDLDescTable ($table, $field="") | |
| Return a pointer of line with description of a table or field. | |
| DDLAddField ($table, $field_name, $field_desc, $field_position="") | |
| Create a new field into table. | |
| DDLUpdateField ($table, $field_name, $field_desc) | |
| Update format of a field into a table. | |
| DDLDropField ($table, $field_name) | |
| Drop a field from table. | |
| DDLCreateUser ($dolibarr_main_db_host, $dolibarr_main_db_user, $dolibarr_main_db_pass, $dolibarr_main_db_name) | |
| Create a user to connect to database. | |
| getDefaultCharacterSetDatabase () | |
| Return charset used to store data in database. | |
| getListOfCharacterSet () | |
| Return list of available charset that can be used to store data in database. | |
| getDefaultCollationDatabase () | |
| Return collation used in database. | |
| getListOfCollation () | |
| Return list of available collation that can be used for database. | |
| getPathOfDump () | |
| Return full path of dump program. | |
| getPathOfRestore () | |
| Return full path of restore program. | |
| getServerParametersValues ($filter='') | |
| Return value of server parameters. | |
| getServerStatusValues ($filter='') | |
| Return value of server status. | |
| getNextAutoIncrementId ($table) | |
| Get the last ID of an auto-increment field of a table. | |
| prepare ($sql) | |
| Prepare a SQL statement for execution (PostgreSQL prepared statement). | |
| execute ($stmt, $params=array()) | |
| Execute a statement previously created with prepare(). | |
Public Member Functions inherited from DoliDB | |
| prefix () | |
| Return the DB prefix found into prefix_db (if it was set manually by doing $dbhandler->prefix_db=...). | |
| stddevpop ($nameoffield) | |
| Return SQL string to aggregate using the Standard Deviation of population. | |
| hintindex ($nameofindex, $mode=1) | |
| Return SQL string to force an index. | |
| idate ($param, $gm='tzserver') | |
| Convert (by PHP) a GM Timestamp date into a string date with PHP server TZ to insert into a date field. | |
| lasterrno () | |
| Return last error code. | |
| sanitize ($stringtosanitize, $allowsimplequote=0, $allowsequals=0, $allowsspace=0, $allowschars=1) | |
| Sanitize a string for SQL forging. | |
| begin ($textinlog='') | |
| Start transaction. | |
| commit ($log='') | |
| Validate a database transaction. | |
| rollback ($log='') | |
| Cancel a transaction and go back to initial data values. | |
| getVersionArray () | |
| Return version of database server into an array. | |
| lastquery () | |
| Return last request executed with query() | |
| order ($sortfield='', $sortorder='') | |
| Define sort criteria of request. | |
| lasterror () | |
| Return last error label. | |
| jdate ($string, $gm='tzserver') | |
| Convert (by PHP) a PHP server TZ string date into a Timestamps date (GMT if gm=true) 19700101020000 -> 3600 with server TZ = +1 and $gm='tzserver' 19700101020000 -> 7200 whatever is server TZ if $gm='gmt'. | |
| lastqueryerror () | |
| Return last query in error. | |
| getRow ($sql) | |
| Return first result from query as object Note : This method executes a given SQL query and retrieves the first row of results as an object. | |
| getRows ($sql) | |
| Return all results from query as an array of objects. | |
Public Member Functions inherited from Database | |
| convertSQLFromMysql ($line, $type='ddl') | |
| Convert a SQL request in Mysql syntax to native syntax. | |
| sanitize ($stringtosanitize) | |
| Sanitize a string for SQL forging. | |
Public Attributes | |
| $type = 'pgsql' | |
| Database type. | |
| const | LABEL = 'PostgreSQL' |
| Database label. | |
| $forcecharset = 'UTF8' | |
| Charset. | |
| $forcecollate = '' | |
| Collation used to force collate when creating database. | |
| const | VERSIONMIN = '9.0.0' |
| Version min database. | |
Public Attributes inherited from DoliDB | |
| const | VERSIONMIN = self::VERSIONMIN |
| Force subclass to implement VERSIONMIN - required DB version. | |
| const | LABEL = self::LABEL |
| Force subclass to implement LABEL - description of DB type. | |
Class to drive a PostgreSQL database for Dolibarr.
Definition at line 38 of file pgsql.class.php.
| DoliDBPgsql::__construct | ( | $type, | |
| $host, | |||
| $user, | |||
| $pass, | |||
| $name = '', | |||
| $port = 0, | |||
| $forcenew = false ) |
Constructor.
This creates an opened connection to a database server and eventually to a database
| string | $type | Type of database (mysql, pgsql...). Not used. |
| string | $host | Address of database server |
| string | $user | Authorized user name |
| string | $pass | Password |
| string | $name | Database name |
| int | $port | Port of database server |
| bool | $forcenew | Force opening of a genuinely new connection instead of reusing one already opened to the same server/database in this process (see connect()) |
Definition at line 84 of file pgsql.class.php.
References $conf, connect(), dol_syslog(), error(), and select_db().
| DoliDBPgsql::affected_rows | ( | $resultset | ) |
Return the number of rows in the result of a request INSERT, DELETE or UPDATE.
| resource | $resultset | Result set of request |
Implements Database.
Definition at line 689 of file pgsql.class.php.
| DoliDBPgsql::close | ( | ) |
Close database connection.
Implements Database.
Definition at line 510 of file pgsql.class.php.
References dol_syslog().
| DoliDBPgsql::connect | ( | $host, | |
| $login, | |||
| $passwd, | |||
| $name, | |||
| $port = 0, | |||
| $forcenew = false ) |
Connection to server.
| string | $host | Database server host |
| string | $login | Login |
| string | $passwd | Password |
| string | $name | Name of database (not used for mysql, used for pgsql) |
| integer | $port | Port of database server |
| bool | $forcenew | Force opening of a genuinely new connection instead of reusing one already opened to the same connection string in this process. By default, pg_connect() silently returns an existing connection resource when called again with an identical connection string within the same PHP process. This is dangerous whenever code intentionally opens a second, independent DoliDB instance to the same database (for example to run a piece of work on its own transaction) and later closes it: without $forcenew, that close() would actually close the shared underlying connection still in use by the original DoliDB instance, causing later queries on it to fail with "PostgreSQL connection has already been closed". Pass true whenever the caller needs a truly independent connection. |
Implements Database.
Definition at line 420 of file pgsql.class.php.
Referenced by __construct().
| DoliDBPgsql::convertSQLFromMysql | ( | $line, | |
| $type = 'auto', | |||
| $unescapeslashquot = false ) |
Convert a SQL request in Mysql syntax to native syntax.
| string | $line | SQL request line to convert |
| string | $type | Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...) |
| bool | $unescapeslashquot | Unescape "slash quote" with "quote quote" |
Definition at line 163 of file pgsql.class.php.
References $conf, $type, and getDolGlobalString().
Referenced by query().
| DoliDBPgsql::DDLAddField | ( | $table, | |
| $field_name, | |||
| $field_desc, | |||
| $field_position = "" ) |
Create a new field into table.
| string | $table | Name of table |
| string | $field_name | Name of field to add |
| array{type:string,label?:string,enabled?:int<0,2>|string,position?:int,notnull?:int,visible?:int,noteditable?:int,default?:string,extra?:string,null?:string,index?:int,foreignkey?:string,searchall?:int,isameasure?:int,css?:string,csslist?:string,help?:string,showoncombobox?:int,disabled?:int,arrayofkeyval?:array<int,string>,comment?:string} | $field_desc Associative array of description of the field to insert [parameter name][parameter value] | |
| string | $field_position | Optionnel ex.: "after champtruc" |
Implements Database.
Definition at line 1227 of file pgsql.class.php.
References dol_syslog(), query(), and DoliDB\sanitize().
| DoliDBPgsql::DDLCreateDb | ( | $database, | |
| $charset = '', | |||
| $collation = '', | |||
| $owner = '' ) |
Create a new database Do not use function xxx_create_db (xxx=mysql, ...) as they are deprecated We force to create database with charset this->forcecharset and collate this->forcecollate.
| string | $database | Database name to create |
| string | $charset | Charset used to store data |
| string | $collation | Charset used to sort data |
| string | $owner | Username of database owner |
Implements Database.
Definition at line 966 of file pgsql.class.php.
References $forcecharset, $forcecollate, dol_syslog(), escape(), and query().
| DoliDBPgsql::DDLCreateTable | ( | $table, | |
| $fields, | |||
| $primary_key, | |||
| $type, | |||
| $unique_keys = null, | |||
| $fulltext_keys = null, | |||
| $keys = null ) |
Create a table into database.
| string | $table | Table name |
| array<string,array{type:string,label?:string,enabled?:int<0,2>|string,position?:int,notnull?:int,visible?:int<-2,5>|string,alwayseditable?:int<0,1>,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,2>,disabled?:int<0,1>,arrayofkeyval?:array<int,string>,autofocusoncreate?:int<0,1>,comment?:string,copytoclipboard?:int<1,2>,validate?:int<0,1>}> | $fields Associative table [field name][table of descrioptions] | |
| string | $primary_key | Name of the field that will be the primary key |
| string | $type | Type de la table |
| ?array<string,mixed> | $unique_keys Associative table - name of fields that will be unique key => value | |
| string[] | $fulltext_keys | Tableau des Name of fields that will be indexed in fulltext |
| array<string,mixed> | $keys Table of key fields - names => value |
Implements Database.
Definition at line 1095 of file pgsql.class.php.
References escape(), query(), and DoliDB\sanitize().
| DoliDBPgsql::DDLCreateUser | ( | $dolibarr_main_db_host, | |
| $dolibarr_main_db_user, | |||
| $dolibarr_main_db_pass, | |||
| $dolibarr_main_db_name ) |
Create a user to connect to database.
| string | $dolibarr_main_db_host | Ip server |
| string | $dolibarr_main_db_user | Name of user to create |
| string | $dolibarr_main_db_pass | Password of user to create |
| string | $dolibarr_main_db_name | Database name where user must be granted |
Implements Database.
Definition at line 1356 of file pgsql.class.php.
References dol_syslog(), escape(), and query().
| DoliDBPgsql::DDLDescTable | ( | $table, | |
| $field = "" ) |
Return a pointer of line with description of a table or field.
| string | $table | Name of table |
| string | $field | Optionnel : Name of field if we want description of field |
Implements Database.
Definition at line 1203 of file pgsql.class.php.
References dol_syslog(), and query().
| DoliDBPgsql::DDLDropField | ( | $table, | |
| $field_name ) |
Drop a field from table.
| string | $table | Name of table |
| string | $field_name | Name of field to drop |
Implements Database.
Definition at line 1333 of file pgsql.class.php.
References error(), DoliDB\lasterror(), query(), and DoliDB\sanitize().
| DoliDBPgsql::DDLDropTable | ( | $table | ) |
Drop a table into database.
| string | $table | Name of table |
Implements Database.
Definition at line 1181 of file pgsql.class.php.
References query().
| DoliDBPgsql::DDLGetConnectId | ( | ) |
Return connection ID.
Implements Database.
Definition at line 946 of file pgsql.class.php.
| DoliDBPgsql::DDLInfoTable | ( | $table | ) |
List information of columns in a table.
| string | $table | Name of table |
Implements Database.
Definition at line 1051 of file pgsql.class.php.
References fetch_row(), and query().
| DoliDBPgsql::DDLListTables | ( | $database, | |
| $table = '' ) |
List tables into a database.
| string | $database | Name of database |
| string | $table | Name of table filter ('xxx') |
Implements Database.
Definition at line 996 of file pgsql.class.php.
References fetch_row().
| DoliDBPgsql::DDLListTablesFull | ( | $database, | |
| $table = '' ) |
List tables into a database.
| string | $database | Name of database |
| string | $table | Name of table filter ('xxx') |
Implements Database.
Definition at line 1024 of file pgsql.class.php.
References fetch_row().
| DoliDBPgsql::DDLUpdateField | ( | $table, | |
| $field_name, | |||
| $field_desc ) |
Update format of a field into a table.
| string | $table | Name of table |
| string | $field_name | Name of field to modify |
| array{type:string,label?:string,enabled?:int<0,2>|string,position?:int,notnull?:int,visible?:int,noteditable?:int,default?:string,index?:int,foreignkey?:string,searchall?:int,isameasure?:int,css?:string,csslist?:string,help?:string,showoncombobox?:int,disabled?:int,arrayofkeyval?:array<int,string>,comment?:string,value?:string,null?:string} | $field_desc Array with description of field format |
Implements Database.
Definition at line 1283 of file pgsql.class.php.
References dol_syslog(), escape(), query(), and DoliDB\sanitize().
| DoliDBPgsql::decrypt | ( | $value | ) |
Decrypt sensitive data in database.
| string | $value | Value to decrypt |
Implements Database.
Definition at line 925 of file pgsql.class.php.
| DoliDBPgsql::encrypt | ( | $fieldorvalue, | |
| $withQuotes = 1 ) |
Encrypt sensitive data in database Warning: This function includes the escape and add the SQL simple quotes on strings.
| string | $fieldorvalue | Field name or value to encrypt |
| int<1,1> | $withQuotes Return string including the SQL simple quotes. This param must always be 1 (Value 0 is bugged and deprecated). |
Implements Database.
Definition at line 904 of file pgsql.class.php.
References escape().
| DoliDBPgsql::errno | ( | ) |
Renvoie le code erreur generique de l'operation precedente.
Implements Database.
Definition at line 803 of file pgsql.class.php.
Referenced by query().
| DoliDBPgsql::error | ( | ) |
Renvoie le texte de l'erreur pgsql de l'operation precedente.
Implements Database.
Definition at line 867 of file pgsql.class.php.
Referenced by __construct(), DDLDropField(), and query().
| DoliDBPgsql::escape | ( | $stringtoencode | ) |
Escape a string to insert data.
| string | $stringtoencode | String to escape |
Implements Database.
Definition at line 751 of file pgsql.class.php.
Referenced by DDLCreateDb(), DDLCreateTable(), DDLCreateUser(), DDLUpdateField(), encrypt(), and regexpsql().
| DoliDBPgsql::escapeforlike | ( | $stringtoencode | ) |
Escape a string to insert data into a like.
| string | $stringtoencode | String to escape |
Implements Database.
Definition at line 762 of file pgsql.class.php.
| DoliDBPgsql::execute | ( | $stmt, | |
| $params = array() ) |
Execute a statement previously created with prepare().
| string | $stmt | Statement name returned by prepare() |
| array<int,mixed> | $params Ordered list of values for the '?' placeholders |
Reimplemented from DoliDB.
Definition at line 1619 of file pgsql.class.php.
References dol_syslog(), DoliDB\lasterror(), and DoliDB\lastqueryerror().
| DoliDBPgsql::fetch_array | ( | $resultset | ) |
Return data as an array.
| resource | $resultset | Resultset of request |
Implements Database.
Definition at line 627 of file pgsql.class.php.
Referenced by getDefaultCharacterSetDatabase(), getDefaultCollationDatabase(), getPathOfDump(), getPathOfRestore(), and getVersion().
| DoliDBPgsql::fetch_object | ( | $resultset | ) |
Returns the current line (as an object) for the resultset cursor.
| resource | $resultset | Cursor of the db request |
Implements Database.
Definition at line 610 of file pgsql.class.php.
Referenced by getListOfCharacterSet(), getListOfCollation(), and getServerParametersValues().
| DoliDBPgsql::fetch_row | ( | $resultset | ) |
Return datas as an array.
| bool | resource | $resultset | Resultset of request @phpstan-param bool|resource|PgSql\Result $resultset |
Implements Database.
Definition at line 645 of file pgsql.class.php.
Referenced by DDLInfoTable(), DDLListTables(), and DDLListTablesFull().
| DoliDBPgsql::free | ( | $resultset = null | ) |
Free the last pointer resultset used by this connection.
| resource | null | $resultset | Result set of request |
Implements Database.
Definition at line 708 of file pgsql.class.php.
Referenced by getListOfCharacterSet(), and getListOfCollation().
| DoliDBPgsql::getDefaultCharacterSetDatabase | ( | ) |
Return charset used to store data in database.
Implements Database.
Definition at line 1376 of file pgsql.class.php.
References fetch_array(), and query().
| DoliDBPgsql::getDefaultCollationDatabase | ( | ) |
Return collation used in database.
Implements Database.
Definition at line 1415 of file pgsql.class.php.
References fetch_array(), and query().
| DoliDBPgsql::getDriverInfo | ( | ) |
Return version of database client driver.
Implements Database.
Definition at line 499 of file pgsql.class.php.
| DoliDBPgsql::getListOfCharacterSet | ( | ) |
Return list of available charset that can be used to store data in database.
Implements Database.
Definition at line 1392 of file pgsql.class.php.
References fetch_object(), free(), and query().
| DoliDBPgsql::getListOfCollation | ( | ) |
Return list of available collation that can be used for database.
Implements Database.
Definition at line 1431 of file pgsql.class.php.
References fetch_object(), free(), and query().
| DoliDBPgsql::getNextAutoIncrementId | ( | $table | ) |
Get the last ID of an auto-increment field of a table.
| string | $table | Name of table |
Reimplemented from DoliDB.
Definition at line 1551 of file pgsql.class.php.
References last_insert_id().
| DoliDBPgsql::getPathOfDump | ( | ) |
Return full path of dump program.
Implements Database.
Definition at line 1453 of file pgsql.class.php.
References fetch_array(), and query().
| DoliDBPgsql::getPathOfRestore | ( | ) |
Return full path of restore program.
Implements Database.
Definition at line 1477 of file pgsql.class.php.
References fetch_array(), and query().
| DoliDBPgsql::getServerParametersValues | ( | $filter = '' | ) |
Return value of server parameters.
| string | $filter | Filter list on a particular value |
Implements Database.
Definition at line 1505 of file pgsql.class.php.
References fetch_object(), and query().
| DoliDBPgsql::getServerStatusValues | ( | $filter = '' | ) |
Return value of server status.
| string | $filter | Filter list on a particular value |
Implements Database.
Definition at line 1529 of file pgsql.class.php.
| DoliDBPgsql::getVersion | ( | ) |
Return version of database server.
Implements Database.
Definition at line 484 of file pgsql.class.php.
References fetch_array(), and query().
| DoliDBPgsql::ifsql | ( | $test, | |
| $resok, | |||
| $resko ) |
Format a SQL IF.
| string | $test | Test expression (example: 'cd.statut=0', 'field IS NULL') |
| string | $resok | Result to generate when test is True |
| string | $resko | Result to generate when test is False |
Reimplemented from DoliDB.
Definition at line 775 of file pgsql.class.php.
| DoliDBPgsql::last_insert_id | ( | $table, | |
| $fieldid = 'rowid' ) |
Get last ID after an insert INSERT.
| string | $table | Table name concerned by insert. |
| string | $fieldid | Field name |
Implements Database.
Definition at line 880 of file pgsql.class.php.
Referenced by getNextAutoIncrementId().
| DoliDBPgsql::num_rows | ( | $resultset | ) |
Return number of lines for result of a SELECT.
| resource | $resultset | Resulset of requests |
Implements Database.
Definition at line 666 of file pgsql.class.php.
| DoliDBPgsql::plimit | ( | $limit = 0, | |
| $offset = 0 ) |
Define limits and offset of request.
| int | $limit | Maximum number of lines returned (-1=conf->liste_limit, 0=no limit) |
| int | $offset | Numero of line from where starting fetch |
Reimplemented from DoliDB.
Definition at line 728 of file pgsql.class.php.
References $conf.
| DoliDBPgsql::prepare | ( | $sql | ) |
Prepare a SQL statement for execution (PostgreSQL prepared statement).
The portable '?' placeholders are translated to PostgreSQL's $1, $2, ... form (placeholders inside single-quoted string literals are left untouched).
| string | $sql | The SQL query with '?' placeholders |
Reimplemented from DoliDB.
Definition at line 1567 of file pgsql.class.php.
References $c, dol_syslog(), DoliDB\lasterror(), and DoliDB\lastqueryerror().
| DoliDBPgsql::query | ( | $query, | |
| $usesavepoint = 0, | |||
| $type = 'auto', | |||
| $result_mode = 0 ) |
Convert request to PostgreSQL syntax, execute it and return the resultset.
| string | $query | SQL query string |
| int | $usesavepoint | 0=Default mode, 1=Run a savepoint before and a rollback to savepoint if error (this allow to have some request with errors inside global transactions). |
| string | $type | Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...) |
| int | $result_mode | Result mode (not used with pgsql) |
Implements Database.
Definition at line 531 of file pgsql.class.php.
References $type, convertSQLFromMysql(), dol_syslog(), errno(), error(), getDolGlobalInt(), getDolGlobalString(), DoliDB\lasterrno(), DoliDB\lasterror(), DoliDB\lastquery(), and DoliDB\lastqueryerror().
Referenced by DDLAddField(), DDLCreateDb(), DDLCreateTable(), DDLCreateUser(), DDLDescTable(), DDLDropField(), DDLDropTable(), DDLInfoTable(), DDLUpdateField(), getDefaultCharacterSetDatabase(), getDefaultCollationDatabase(), getListOfCharacterSet(), getListOfCollation(), getPathOfDump(), getPathOfRestore(), getServerParametersValues(), and getVersion().
| DoliDBPgsql::regexpsql | ( | $subject, | |
| $pattern, | |||
| $sqlstring = 0 ) |
Format a SQL REGEXP.
| string | $subject | Field name to test |
| string | $pattern | SQL pattern to match |
| int | $sqlstring | 0=the string being tested is a hard coded string, 1=the string is a field |
Reimplemented from DoliDB.
Definition at line 788 of file pgsql.class.php.
References escape().
| DoliDBPgsql::select_db | ( | $database | ) |
Select a database PostgreSQL does not have an equivalent for mysql_select_db Only compare if the chosen DB is the one active on the connection.
| string | $database | Name of database |
Implements Database.
Definition at line 393 of file pgsql.class.php.
Referenced by __construct().