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

Support complex queries and pagination. #88

Closed

Conversation

Mike-Benoit
Copy link
Contributor

See commit message and example URL.

…r be able to figure out on its own. This stems from a bug dating back to 2012. This fix has been in use since that time in hundreds of thousands of production installations. See this URL for the original bug report: http://phplens.com/lens/lensforum/msgs.php?id=19058&PHPSESSID=0f2d944e22ddc2eb9903e468ba1e597d
@dregad dregad closed this in 41839f5 Apr 20, 2015
@dregad dregad modified the milestone: v5.20 Jul 9, 2015
dregad pushed a commit that referenced this pull request Aug 4, 2015
Commit 41839f5 (fix for #88) introduced
a regression, causing error in some cases, for example "oci_execute()
expects parameter 1 to be resource, string given".

This resolves the problem by only attempting str_replace() on strings
rather than arrays.

Signed-off-by: Damien Regad <dregad@mantisbt.org>

Original patch was modified to wrap long comments and improve commit
message.
dregad pushed a commit that referenced this pull request May 25, 2016
This reverts the regular expression back to its original (i.e. before it
was changed in #88, see commit 41839f5)
as it seems to work in more cases, and doesn't break simple ones. Since
we support _ADODB_COUNT now anyways we should be able to handle any
possible situation.

Fixes #236, #239

Signed-off-by: Damien Regad <dregad@mantisbt.org>
dregad added a commit that referenced this pull request Apr 10, 2021
Following discussion in #718, using regex to identify and remove
sub-queries in _adodb_getcount() is flawed and can't be fixed. This led
to implementing a hack using _ADODB_COUNT "keyword" to (see #88
41839f5).

This replaces the regex parsing by a simple loop on the query string,
removing everything between the SELECT and the FROM clause, ignoring
whatever is between parentheses (i.e. subqueries).

The _ADODB_COUNT logic is therefore obsolete

Fixes #715
dregad added a commit that referenced this pull request Apr 23, 2021
Following discussion in #718, using regex to identify and remove
sub-queries in _adodb_getcount() is flawed and can't be fixed. This led
to implementing a hack using _ADODB_COUNT "keyword" to (see #88
41839f5).

This replaces the regex parsing by a simple loop on the query string,
removing everything between the SELECT and the FROM clause, ignoring
whatever is between parentheses (i.e. subqueries).

The _ADODB_COUNT logic is therefore obsolete

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

Successfully merging this pull request may close these issues.

None yet

2 participants