fishjerky / phalcon-mssql

phalcon mssql pdo db adapter
22 stars 17 forks source link

Error Using Library #5

Open derekang opened 8 years ago

derekang commented 8 years ago

Hi,

I faced the following error when added to namespace and registering db in services.

( ! ) Strict standards: Declaration of Twm\Db\Adapter\Pdo\Mssql::executePrepared() should be compatible with Phalcon\Db\Adapter\Pdo::executePrepared(PDOStatement $statement, array $placeholders, $dataTypes) in C:\wamp\sites\apacnet\app\vendor\mssql\db\adapter\Mssql.php on line 10

Any help appreciated.

fishjerky commented 8 years ago

Did you download version:1.x for Phalonc 2.0?

derekang commented 8 years ago

Hi,

I am using Phalcon 2.0.1. Is it supported?

fishjerky commented 8 years ago

Well... We did write v2.x which support Phalcon 2.0, you may download it from branch v2.x.

Unfortunately, we find out "limit" is not supported. XD

derekang commented 8 years ago

Hi fish,

Changed to version2.x. Still received this error.

Strict standards: Declaration of Twm\Db\Adapter\Pdo\Mssql::executePrepared() should be compatible with Phalcon\Db\Adapter\Pdo::executePrepared(PDOStatement $statement, array $placeholders, $dataTypes) in C:\wamp\sites\apacnet\app\vendor\mssql\db\adapter\Mssql.php on line 10

https://github.com/phalcon/cphalcon/blob/880b4fde422c1e7a112d5546e274d12f6784442a/phalcon/db/adapter/pdo.zep#L184

https://github.com/fishjerky/phalcon-mssql/blob/master/test/app/library/db/adapter/Mssql.php#L276

is it due to mismatching method declarations?

SoccerField24x7 commented 8 years ago

Off the top of my head - as I haven't had a chance to look at it yet - you need to remove the array declaration from before $placeholders. Start there and let me know if that solves that issue.

tr33m4n commented 8 years ago

Hi Derek,

Essentially this error means that the function in this library that is overriding the default function has to implement the same parameters. You can update the specific function it tells you with the parameter from the error (or compare them side by side) and you'll get a bit further. However this plugin has not been updated for a while and I never got it to work... You might have better luck however On 25 Aug 2015 06:21, "SoccerField24x7" notifications@github.com wrote:

Off the top of my head - as I haven't had a chance to look at it yet - you need to remove the array declaration from before $placeholders. Start there and let me know if that solves that issue.

— Reply to this email directly or view it on GitHub https://github.com/fishjerky/phalcon-mssql/issues/5#issuecomment-134479370 .