Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

executePrepared returning null

Hi guys,

I want to use the prepare/executePrepared methods for an Insert statement.

The execution of the prepare method return me a PDOStatement object with my query on the value of queryString.

Now, when execute the method $connection->executePrepared($myPDOStatementString, $myArrayBinding), I receive a null value. My connection object contain: Object of: Phalcon\Db\Adapter\Pdo\Oracle

Someone know what happen?

Thank you.

  • Mike


83.4k
Accepted
answer

executePrepared is not intended to be used directly, you can use query, execute, insert, update or delete and these methods will use prepared statements for you

Thanks for the reply.

Now I catch an exception from the insert method. Maybe my problem is that I'm using Oracle spatial function on one of my value of the binding. I know it's a PDO issue but do you know if it's possible? I'm looking for an answer right now. Google is my friend...

Before trying the binding, I was looking for using the escapeString method for some values coming from the user. But it's seem that with PDO Oracle, the escapeString always returning false instead of the escaped value.

I hope to find the good way to do my insertion...