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

Limit clause with sql server #29

Open
johnlackey opened this issue Mar 3, 2016 · 6 comments
Open

Limit clause with sql server #29

johnlackey opened this issue Mar 3, 2016 · 6 comments
Assignees
Milestone

Comments

@johnlackey
Copy link

Can we detect driver and change LIMIT 1 to TOP(1) and place after SELECT?

@FaaPz FaaPz mentioned this issue Mar 3, 2016
11 tasks
@FaaPz FaaPz added this to the v2.0.0 milestone Mar 3, 2016
@FaaPz
Copy link
Owner

FaaPz commented Mar 3, 2016

Might be something to look into for V2. 👍

@kwhat
Copy link
Collaborator

kwhat commented Mar 4, 2016

I maybe able to contribute one here soon.

@kwhat
Copy link
Collaborator

kwhat commented Sep 20, 2019

Ok, now that 2.x stuff is just about done, I am going to shoot for this around version 3.x. @johnlackey If its still a desire, you can extend v2 to override the __toString() rendering. You will need to extend the database class as well if you want to use it as a factory.

@kwhat kwhat self-assigned this Sep 20, 2019
@kwhat kwhat modified the milestones: v2.0.0, v3.0.0 Sep 20, 2019
@kwhat
Copy link
Collaborator

kwhat commented Dec 16, 2019

@johnlackey Do you know what the support for TOP limit is in sql server? I seem to remember there being a syntax change in 2012. The old code I was using looked something like OFFSET {$this->offset} ROWS FETCH NEXT {$this->number} ROWS ONLY but I think that was only for 2012 and later.

@johnlackey
Copy link
Author

TOP is supported for 2005 and above

@kwhat
Copy link
Collaborator

kwhat commented Dec 17, 2019

@johnlackey https://github.com/kwhat/PDO-SqlSrv Give this a go. It will only work with what I will be pushing to the 2.1 branch.

@kwhat kwhat added the vcs label Dec 18, 2019
@kwhat kwhat mentioned this issue Dec 21, 2019
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants