Open ruudboon opened 8 years ago
have you tried something like:
$parameters = array( "conditions"=>"name=?0 AND year=?1", "bind"=>array("Robotina",2008) ); $robots = Robots::find($parameters);
I tried but it's giving the same errors. It looks like it's triggered by numRows() function in phalcon/db/result/pdo.zep that it's fireing a new query the get the number of rows. https://github.com/phalcon/cphalcon/blob/master/phalcon/db/adapter/pdo.zep
I tried to reproduce the problem on my installation, but without success. Have you tried to make a test using another type of database (ie: mysql) ?
Yeah I did. Works fine with a different DB. I will see if I can isolate the issue.
In file Airaghi/PhalconPHP/MSSQL/Dialect/Mssql.php uncomment lines 432 and 433, so you will be able to see the "real queries" sent to the database.
Which version of PhalconPHP are you using ?
have you tried to use the "native" odbc driver for SQL Server released by Microsoft?
just to be sure it's not a problem related to FreeDTS
I'm on FreeBSD the Microsoft drivers aren't available for FreeBSD :(
$parameters = array( "conditions"=>"name=?0 AND year=?1", "bind"=>array("Robotina",2008) ); $robots = Robots::find($parameters);
- this work fine, but string placeholders not working ((((
i really never tested "string placeholders", the project using these classes doesn't use them. This implementation is just a "basic one", so it has some limitation ...
When trying to load a model with Model::findFirst(id); I get the following notice. Notice: Cannot use a scalar value as an array in phalcon/db/result/pdo.zep on line 219 in script on line x
It also happens when using find like the phalcon example
And result in the model not loaded.