error in your SQL syntax

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' `sender_id` = 0, `recipient_id` = ' at line 7

i get thing when trying to view members profile

how can i fix this thanks

Quote · 11 Jan 2013

anyone?

Quote · 11 Jan 2013

Can you provide more?  There are a lot of sql calls in Dolphin.

Geeks, making the world a better place
Quote · 11 Jan 2013

Do you have any 3rd party modules that also put blocks on the profile page? You can go into the Profile Page Builder and start moving the boxes down to the 'inactive' area until you find the culprit causing the problems.

Nothing to see here
Quote · 11 Jan 2013
Database query error
Query:
INSERT INTO `bx_spy_data` SET `alert_unit` = '71', `alert_action` = '71', `object_id` = Array, `comment_id` = , `sender_id` = 0, `recipient_id` = 0, `lang_key` = '', `params` = '', `date` = TIMESTAMP( NOW() ), `type` = 'content_activity'
Mysql error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' `sender_id` = 0, `recipient_id` = ' at line 7
Found error in the file '/home/herodate/public_html/modules/boonex/spy/classes/BxSpyDb.php' at line 359.
Called 'query' function with erroneous argument #0.

Debug backtrace:

i took for every block off the profile page......
i can view my profile but when i go on someone else page it i get the bug
Quote · 11 Jan 2013

 Where are all the quotes in the query? Did someone edit the code for you or you did?

`comment_id` = ,

 Post the code in BxSpyDb.php' at line 359.

so much to do....
Quote · 11 Jan 2013

sorry what quotes?

Quote · 11 Jan 2013

line 341     // execute query;
            $sQuery =
            "
                INSERT INTO
                    `{$this->sTablePrefix}data`
                SET
                    `alert_unit`    = '{$sAlertUnit}',
                    `alert_action`    = '{$sAlertAction}',
                    `object_id`        = {$iObjectId},
                    `comment_id`    = {$iCommentId},
                    `sender_id`     = {$iSenderId},
                    `recipient_id`  = {$iRecipientId},
                    `lang_key`      = '{$sLangKey}',
                    `params`        = '{$aParameters}',
                    `date`          = TIMESTAMP( NOW() ),
                    `type`          = '{$sActivityType}'
            ";

         line 359   $this -> query($sQuery);
            return $this -> lastId();
        }

        function deleteActivityByObject($sUnit, $iObjectId, $iCommentId = 0)
        {
            $sWhereAddon = "";
            if($iCommentId != 0)
                $sWhereAddon = "AND `comment_id`='" . $iCommentId . "'";

            $sSql = "DELETE FROM
                    `" . $this->sTablePrefix . "data`
                WHERE
                    `alert_unit`='" . $sUnit . "' AND
                    `object_id`='" . $iObjectId . "' " . $sWhereAddon;

            return $this->query($sSql);
   line 376     }

 Where are all the quotes in the query? Did someone edit the code for you or you did?

`comment_id` = ,

 Post the code in BxSpyDb.php' at line 359.

 

Quote · 11 Jan 2013

Fixed

Quote · 15 Jan 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.