> Hi,
>> I need help with my interchange admin.
> I clicked on reports on top of the menu to see the orders and the
> traffic.
> The traffic is working fine, but the orders is not working.
> The orders to see the order statistics consists of three choices:
> overall by
> month, by day this month, individual orders this month. Then on the
> bottom
> there are another option with drop down month, date, year from
> beginning and
> the ending.
>> I tried clicking on overall by month and by day this month and the drop
> down
> date to see the order statistics and came up this message in red color
> :
> "table transactions: SQL query failed: syntax error: unknown op '!=' at
> /usr/local/cpanel/3rdparty/interchange/lib/Vend/SQL_Parser.pm line 447.
> query was: select affiliate, campaign, total_cost, order_date from
> transactions WHERE deleted != '1' order by affiliate, campaign,
> order_date"
>> Then, I tried clicking on individual orders this month and came up this
> message in red color :
> "table transactions: SQL query failed: syntax error: unknown op '!=' at
> /usr/local/cpanel/3rdparty/interchange/lib/Vend/SQL_Parser.pm line 447.
> query was: select order_number, affiliate, campaign, total_cost,
> payment_method, state, city, status, order_date from transactions WHERE
> deleted != '1' AND order_date like '200707%' order by order_number "
> and on the bottom with big bold message : "Bad query specified, caused
> error."
>> Can anyone help me to find out what is wrong with it?
> How do I fix it? Can someone who does NOT know programming fix this
> error?
> Please help.
> Thank you.
/usr/local/cpanel/3rdparty/interchange/lib/Vend/SQL_Parser.pm apparently
does not like the !=
There is a list of operators that are OK:
my %valid_op = (
'<' => 'lt',
'<=' => 'le',
'<>' => 'ne',
'=' => 'eq',
'>' => 'gt',
'>=' => 'ge',
'like' => 1,
'in' => 1,
'is' => 'eq',
'between' => 1,
);
I suppose this could be considered a bug and '!=' => 'ne' should be
added to SQL_Parser.pm
Looking at the path, you are not the one having access to make any patches
to the code, so you
are left to the mercy of others (such as your provider) to fix it.
Another option, that might work (although haven't tried etc) is to make a
'local' copy of the
files that have a problem and put them in your own content tree under
pages/admin/reports/order/ .
So for example get:
http://www.icdevgroup.org/cgi-bin/cvsweb/interchange/dist/lib/UI/pages/admin
/reports/order/ByAffiliate.html?rev=2.5;content-type=text%2Fplain
Change the query:
sql="
select affiliate, campaign, total_cost, order_date
from transactions
WHERE deleted != '1' [scratch date_limit] [scratch
synd_limit]
order by affiliate, campaign, order_date
Change != into <>
Publish this file in 'pages/admin/reports/order' ...
If this path does not exist and you cannot create it then put it in
'pages/admin/reports' and see if you can change
the path to this page in the editor by clicking on 'edit' (red on the same
row as 'Overall by month' in the Report section)
click on 'Overall by month' so it becomes loaded and update 'Page' on the
right side. Publish and see if this works.
CU,
Gert