-
-
Notifications
You must be signed in to change notification settings - Fork 136
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
%if and %lmt dosn't work together #87
Comments
Why don't you just set |
You are poiting out some irrelevant things. It's about the fact, the %lmt cluase is appended at the end without taking care of %if. |
$limit = 0;
$connection->query('
SELECT * FROM foo
%if ', FALSE, ' LIMIT %i ', $limit, ' %end
'); works ok |
I'm pointing out that you should not use Try to modify dibi/dibi/libs/DibiTranslator.php Line 538 in cbdcc3f
if ($this->args[$cursor] !== NULL && !$this->comment) $this->limit = (int) $this->args[$cursor]; |
I'm pointing out that using %if don't have to include only %lmt expression, it could include more. I've solved by %i modifier, the top limits don't borther me. |
I've just hit the same issue, apparently affects both
yields
Obviously settings the limit or offset to null works just fine as a workaround, but, well, what's the point of IMHO something like |
* master: (37 commits) Released version 2.3.1 removed version.txt dibi: named connections are allowed [Closes dg#161] Dibi: Dump now recognize MsSql2012 offset as keyword DibiPdoDriver: added support for MsSql2012 Offset Tracy\Panel: added vector icon added contributing.md Released version 2.3.0 Postgre: added test for matching by %like Postgre: fixed %like escaping [Closes dg#159] Dibi: $defaultDriver changed to mysqli [Closes dg#156] Released 2.3.0-RC1 removed bridge for Nette 2.0 (BC break) dibi: named connections and activate() are deprecated (BC break) DibiFluent: add `leftJoin` and `on` to phpdoc. DibiFirePhpLogger: save some header operations for sites with hundreds of sql queries. DibiFirePhpLogger: Allow user defined size of json stream chunks [Closes dg#148] DibiTranslator: respect %if blocks for %lmt and %ofs as well [Closes dg#145][Closes dg#87] DibiResult: float detection locale fix [Closes dg#154] DibiMySqliDriver.php: fixes for HHVM ...
produces
same with offset.
The text was updated successfully, but these errors were encountered: