Subject | Variable parameters number |
---|---|
Author | masotti |
Post date | 2008-05-09T12:47:12Z |
Converting a project from Delphi to PHP, I've a set of query (generic
SIUD) stored somewhere.
At a certain moment I've a centralized function with:
- query source
- parameters names and values
I don't know number and order of parameters.
For number of parameters, ibase_prepare()+ibase_num_params() can solve,
but ibase_param_info() works only for type and length: name is "".
I'm not able to find a solution to know order of parameters. If it'd
possible, I can use eval() as last resource.
Are ther any other solution than writing query with named parameters
(i.e. like BDE's :PARAM_NAME) and substituting all references in query
source string the hard way?
Ciao.
Mimmo.
SIUD) stored somewhere.
At a certain moment I've a centralized function with:
- query source
- parameters names and values
I don't know number and order of parameters.
For number of parameters, ibase_prepare()+ibase_num_params() can solve,
but ibase_param_info() works only for type and length: name is "".
I'm not able to find a solution to know order of parameters. If it'd
possible, I can use eval() as last resource.
Are ther any other solution than writing query with named parameters
(i.e. like BDE's :PARAM_NAME) and substituting all references in query
source string the hard way?
Ciao.
Mimmo.