Post by beata » Thu Nov 01, 2007 9:23 pm

Well, I think some developers prefer using uppercase of SQL statement than lowercase. (like me...)

However, if we' using uppercased SQL statement, we'll get an error message.
Because the regular expression in the first line of spliteQuery() is case sensitive.

Code: Select all

$count = $this->getRow(
  preg_replace(
    array('/select(.*)from /As', '/order by (.*)/'),
    array('select count(*) as total from ', ''),
    $sql, 1)
);
Although we could make it insensitive through adding ignore case mod in the regular expression.
But every time after update, we got to change the default source file manually.

Would it be possible to be support in the next release?

Newbie

Posts

Joined
Thu Nov 01, 2007 8:41 pm

Post by Daniel » Thu Nov 08, 2007 6:45 am

beata wrote: Well, I think some developers prefer using uppercase of SQL statement than lowercase. (like me...)

However, if we' using uppercased SQL statement, we'll get an error message.
Because the regular expression in the first line of spliteQuery() is case sensitive.

Code: Select all

$count = $this->getRow(
  preg_replace(
    array('/select(.*)from /As', '/order by (.*)/'),
    array('select count(*) as total from ', ''),
    $sql, 1)
);
Although we could make it insensitive through adding ignore case mod in the regular expression.
But every time after update, we got to change the default source file manually.

Would it be possible to be support in the next release?
Just for you in the next release its all going to be uppercase SQL sytax.

I have also changed how the pagination works and its no longer done in the DB class.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by beata » Fri Nov 09, 2007 6:42 am

It sounds great. I can't wait to see the next release.

Thanks Daniel!

Newbie

Posts

Joined
Thu Nov 01, 2007 8:41 pm
Who is online

Users browsing this forum: No registered users and 2 guests