Your message dated Sun, 10 Sep 2017 16:04:38 +0000
with message-id <[email protected]>
and subject line Bug#870989: Removed package(s) from unstable
has caused the Debian Bug report #378238,
regarding IC is very particular with SQL-statements inside a [query] tag
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
378238: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=378238
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
package: interchange

Hi!

I have got a problem with using some SQL-statements. All of this statements work in the MySQL-Shell and within phpMyAdmin, but not inside a [query] tag. These are the queries in question, followed by the error I get:

[query  type=list
        random='[control matches]'
        sql=|   SELECT  p.sku AS sku, m.times_ordered AS times_ordered
                                FROM    products p, merchandising m
                                WHERE   p.sku = m.sku
                                AND     p.image <> ''
                                ORDER BY m.times_ordered DESC
                                LIMIT   10
|]
-> standard /cgi-bin/standard Runtime error: Bad column name (from p.sku AS sku): 'p.sku AS sku' at /interchange/lib/Vend/SQL_Parser.pm line 838.

SELECT  *
FROM    products p, merchandising m
WHERE   p.sku = m.sku
AND     p.image <> ''
ORDER BY m.times_ordered DESC
LIMIT   10
-> standard /cgi-bin/standard Runtime error: Bad column name (from m.times_ordered DESC
              LIMIT   10): 'm.times_ordered DESC
LIMIT 10' at /interchange/lib/Vend/SQL_Parser.pm line
915.

SELECT  *
FROM    products p, merchandising m
WHERE   p.sku = m.sku
AND     p.image <> ''
ORDER BY 'm.times_ordered' DESC
LIMIT   10
-> standard /cgi-bin/standard Runtime error: Vend::Table::Shadow::query can handle only one table at /interchange/lib/Vend/Table/Shadow.pm line 323.

I have even tried the queries without the 'random'-line, to no avail. Finally i had to use this workaround, which works, but is less efficient due to the 'SELECT *':
[query  type=list
        random='[control matches]'
        sql=|   SELECT *
                FROM products p INNER JOIN merchandising m
                ON p.sku = m.sku
                WHERE p.image <> ''
                ORDER BY 'w.times_ordered' DESC
                LIMIT 10
|]

Moreover with this solution I cannot access fields that exist in both tables, like 'featured', because [sql-param featured] is always empty then. :(

Any idea? (my setup: Interchange 5.4, MySQL 4.0.24, Perl 5.8.2)

Greetings,
Adam

--
May the source be with GNU!


--- End Message ---
--- Begin Message ---
Version: 5.7.7-2.1+rm

Dear submitter,

as the package interchange has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/870989

The version of this package that was in Debian prior to this removal
can still be found using http://snapshot.debian.org/.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
[email protected].

Debian distribution maintenance software
pp.
Scott Kitterman (the ftpmaster behind the curtain)

--- End Message ---

Reply via email to