Subject Re: [firebird-php] ibase_param_info
Author Sándor Tamás
Yes, I'm absolutely sure.
I use PHP 5.2.11, and this is the output of a test page:

This is the original SQL statement:string(63) "select * from hotsys where alrend= :alrend and moddat = :moddat"
This is the SQL I post to ibase_prepare:string(51) "select * from hotsys where alrend= ? and moddat = ?"
These are var_dump()s of ibase_param_info results:
array(10) {
[0]=>
string(0) ""
["name"]=>
string(0) ""
[1]=>
string(0) ""
["alias"]=>
string(0) ""
[2]=>
string(0) ""
["relation"]=>
string(0) ""
[3]=>
string(1) "3"
["length"]=>
string(1) "3"
[4]=>
string(7) "VARCHAR"
["type"]=>
string(7) "VARCHAR"
}
array(10) {
[0]=>
string(0) ""
["name"]=>
string(0) ""
[1]=>
string(0) ""
["alias"]=>
string(0) ""
[2]=>
string(0) ""
["relation"]=>
string(0) ""
[3]=>
string(1) "8"
["length"]=>
string(1) "8"
[4]=>
string(9) "TIMESTAMP"
["type"]=>
string(9) "TIMESTAMP"
}



2010.07.28. 10:49 keltezéssel, masotti írta:
>
>
>
> On 28/07/2010 10:00, Sándor Tamás wrote:
> >
> >
> > Hello,
> >
> > I'm just curious about the naming of FB parameters.
> > I realized, that ibase_param_info returns an array which has a "name"
> > and an "alias" key. How can I give these values to an ibase_prepare
> > statement?
>
> Mmhh.. are you sure?
> I've not checked recent releases, but 5.2.6 PHP docs incorrectly states
> about "name" and "alias" because a rapid check can confirm that in that
> release ibase_param_info() returns an array with "type" and "length": no
> name then.
> And this make sense, because parameteres in queries are positional only
> with a question mark and not named parameters.
>
> Ciao.
> Mimmo.
>
>



[Non-text portions of this message have been removed]