Repository navigation
Conversation
…ne by find_one() by default. Useful for databases that doesn't support LIMIT (SQL Server).
|
Thank you for the pull request, but I am not sure I like this approach. |
|
Here is a link to the pull request I mentioned: #37 |
|
That would indeed be a lot better! The only thing I would add is I'm using dblib as the pdo driver because mssql and sybase are only available on Windows. If you want I could take this and apply the change for dblib and ask for another pull request? |
…IT 1' done by find_one() by default. Useful for databases that doesn't support LIMIT (SQL Server)." This reverts commit 5c195d5.
Conflicts: test/test_classes.php test/test_mssql.php test/test_queries.php
…idiorm. Added case choice for dblib driver to use the TOP style limit.
|
I am not sure what is happening here with the code, but it doesn't look nice. Please could you create a new feature branch from idiorm:master and create a pull request against idiorm:develop by manually writing your code inspired by pull request #37. I think you have tried to merge their code in - it is worth noting that Idiorm has a changed a bit since that pull request was written. There seems to be a load of old code coming back into Idiorm with your pull request. For example we do not want the old test files back in the project. New tests should be written with PHPUnit. |
|
Oh I see... Sorry about that. Will do! |
Hello,
I'm still working with SQL Server and idiorm and I noticed
LIMITisn't supported by SQL Server (there is another way to do it :SELECT TOP 1).This cause a pretty big problem because it breaks the use of
find_one()that forces a$this->limit(1)on every query.Fixing
_build_limit()could be the perfect option but because of how_build_limit()is implemented, it makes it a very hard thing to do.This is a simple fix that includes a new option called
find_one_limit. If this options is set to any value, theLIMIT 1is bypassed.Thanks.