[SR-Users] Siremis error Call to a member function getQuoted()

Janoz janoz at iol.it
Wed Mar 25 11:37:35 CET 2015


Thank you Daniel.

As correctly stated by canuck15, this problem arises by using the reserved
(in MySql) word "group" as a name of a table. You can circumvent this by
adding back ticks around this reserved word, but I'd rather change this
reserved word in a future release.

Anyway, the solution you suggested is correct, it was not functioning just
because the back ticks need to be added around the mainTable too. Here's a
quick-and-dirty patch:

Edit /var/www/siremis-4.2.0/openbiz/bin/data/BizDataSql.php (actual file
position may vary)

On line 295 (in bold below) add back ticks around $mainTable:


    /**
     * Add main table in the sql statement T0 alias
     *
     * @param string $mainTable main table name
     * @return void
     **/
    public function addMainTable($mainTable)
    {
        $this->_mainTable =  "$mainTable";
*                $this->_tableJoins = " `$mainTable` T0 ";*
    }

This will solve the error previously reported, but could leave some loophole
if the reserved word "group" ends up in another part of the SQL statement
(as constructed by BizDataSql.php

I'm sure there's a more elegant way to solve this, but for now it just
solved my problem.

J.






--
View this message in context: http://sip-router.1086192.n5.nabble.com/Siremis-error-Call-to-a-member-function-getQuoted-tp136417p136482.html
Sent from the Users mailing list archive at Nabble.com.



More information about the sr-users mailing list