(no version information, might be only in CVS)
pg_query_params -- Execute a query, specifying query variables as separate parameterspg_query_params() works identically to pg_query(), except that instead of putting query parameters directly into the query string, placeholders are used and the parameters are passed in separately. Unlike pg_query(), only one non-empty SQL statement can be executed at a time.
Parameters passed in this way are automatically quoted and escaped if necessary. This is an effective way of improving the security of your scripts and eliminating the need for manual quoting and escaping of parameters.
Placeholders are indicated in the query by $1, $2, $3 and so on. The first parameter will be substituted for $1, the second for $2, the third for $3.
Précédent | Sommaire | Suivant |
pg_put_line | Niveau supérieur | pg_query |