Mailzu - There was an error executing your query - after 2.7.0 SQL changes

Gary V mr88talent at gmail.com
Sun Nov 27 19:01:34 CET 2011


I updated an SQL database per release notes in 2.7.0
http://www.amavis.org/release-notes.txt :

  The following SQL directives can be used to add these new fields:
    ALTER TABLE msgrcpt ADD rseqnum     integer  DEFAULT 0   NOT NULL;
    ALTER TABLE msgrcpt ADD content     char(1)  DEFAULT ' ' NOT NULL;
    ALTER TABLE msgrcpt ADD is_local    char(1)  DEFAULT ' ' NOT NULL;
    ALTER TABLE msgs    ADD originating char(1)  DEFAULT ' ' NOT NULL;

and now when initially logging into Malzu, I was getting an error on
the Summary page "There was an error executing your query:". I looked
in the mailzu log and executed the query manually and got:

ERROR 1052 (23000): Column 'content' in field list is ambiguous

So, for the benefit of others,  the fix was to make it unambiguous in
DBEngine.class.php - also one other small fix is included here:

cp DBEngine.class.php DBEngine.class.php.original

sed -i 's/dbtype/dbType/' DBEngine.class.php
sed -i 's/COUNT(content)/COUNT(msgs.content)/' DBEngine.class.php
sed -i 's/WHERE content=/WHERE msgs.content=/' DBEngine.class.php

-- 
Gary V


More information about the amavis-users mailing list