Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

archive.php - SQLSTATE[42S22]: Column not found: 1054 Unknown column '-1' in 'field list' #3453

Closed
anonymous-piwik-user opened this Issue · 7 comments

2 participants

Anonymous Piwik user Matthieu Aubry
Anonymous Piwik user

As mentioned in the forum (http://forum.piwik.org/read.php?2,94529) there is a problem with core/RankingQuery.php.

The fix from matt solves the problem:

--- core/RankingQuery.php (revision 7136)
+++ core/RankingQuery.php (revision )
@@ -288,7 +288,7 @@
{
$labelColumnsOthersSwitch[] = "
CASE

  • WHEN counter = $limit THEN \"{$this->othersLabelValue}\"
  • WHEN counter = $limit THEN '{$this->othersLabelValue}' ELSE !$column END AS !$column ";

Now archive.php is running fine. But withing the Transitions plugin, there is still an error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column !'' in 'field list'

The same problem exists with a totaly new and clean install of piwik

My setup:

SuSE Linux Enterprise
PHP 5.3.17 with APC
mysql 5.5.28 x64 Community

Matthieu Aubry
Owner

(In [7293]) Fixes #3453 Compatibility with ANSI_QUOTES
If the ANSI_QUOTES SQL mode is enabled, string literals can be quoted only within single quotes because a string quoted within double quotes is interpreted as an identifier.

Matthieu Aubry
Owner

(In [7294]) Without debug statement please Refs #3453

Anonymous Piwik user

There is still a problem with the Transitions plugin:
SQLSTATE[42S22]: Column not found: 1054 Unknown column !'' in 'field list'

Matthieu Aubry
Owner

I fixed in: http://dev.piwik.org/trac/changeset/7293#file1

have you tried this patch? it works for me

Anonymous Piwik user

Yes i did exactly the same patch here without success.

After waiting for 2-3 seconds, i get SQLSTATE[42S22]: Column not found: 1054 Unknown column ' ' in 'field list'

Anonymous Piwik user

OK.. found it.

You need to change this line
WHEN '.Piwik_Common::REFERER_TYPE_CAMPAIGN.' THEN CONCAT(referer_name, " ", referer_keyword)

to

WHEN '.Piwik_Common::REFERER_TYPE_CAMPAIGN.' THEN CONCAT(referer_name, \' \', referer_keyword)

then everything is working fine

Matthieu Aubry
Owner

(In [7302]) Fixes #3453 Thanks for tip tsfoer. ANSI_SQL compatibility. Refs #3332

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.