2
Suppose I have an appointment with prepare that is this way:
select senha from usuarios where id=? //or id2=?, array($id,$id2); (é só um exemplo).
My intention is to change the ? by any other value that I choose within the array and not that it takes the order that is within the array.
For example the first id=? take the value of position 2 of the array.
I am using postgresql database and PHP programming language
I am using the Adodb library. I tried this way but could not, any suggestions? $rs = $db->Execute('select name from table Where val=:key', array('key' => 10));
– José
From the ADODB documentation (http://phplens.com/lens/adodb/docs-adodb.htm), that seems to me to be the case. Running the query directly in the database, you get some result?
– Rodrigo Rigotti
This answer presupposes the use of PDO, right? I don’t think ADO has
bindParam.– bfavaretto
Actually the parameters come in
arraywhich is the second parameter of the methodExecute.– Rodrigo Rigotti
the ADO has bind. In the database I did not get to test yet but in php debug it accuses error next to ":" after the sign of "=".
– José
Try to separate them by space or use
?instead of named parameters.– Rodrigo Rigotti