Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sqlsrv driver gives incorrect syntax #71

Open
ghost opened this issue Oct 11, 2013 · 1 comment
Open

Sqlsrv driver gives incorrect syntax #71

ghost opened this issue Oct 11, 2013 · 1 comment
Labels

Comments

@ghost
Copy link

ghost commented Oct 11, 2013

Created by Ben B, 9th Aug 2011. (originally Lighthouse ticket #26):


Running a cake 1.3.11 site with the latest PHP sqlsrv drivers from microsft and the cakePHP dbo_sqlsrv driver from this project I get the following error when any SQL statements are executed on my site:

Warning (512): SQL Error: [Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near 'execute'.
 [CORE\cake\libs\model\datasources\dbo_source.php, line 684]
Query: execute 

The query it tries to run is literally the string "execute" on it's own. Here is the connection info it's using:

var $default = array(
        'driver' => 'Datasources.DboSqlsrv',
        'persistent' => false,
        'host' => 'ITSRV',
        'login' => 'sa',
        'password' => 'password',
        'database' => 'DB',
        'prefix' => 'pre_',
    );
@ghost
Copy link
Author

ghost commented Oct 11, 2013

31st Aug 2011, Ben B said:


Sounds like you're using $this->execute($sql), the new format (since cake 1.3 I believe) has been $this->query($sql)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant