//Prepare db
$db = JFactory::getDbo();
//Get asset via comment id
$comment_id = [var1_id];
$db->setQuery("SELECT `asset` FROM `#__comprofiler_plugin_activity_comments` WHERE `id` = ".$comment_id );
$db->execute();
$asset = $db->loadResult();
//Insert asset id
$db->setQuery("INSERT INTO `#__testing` (`a`, `b`) VALUES (".$asset.",".$asset .")");
$db->execute();
Please Log in to join the conversation.
INSERT INTO `#__testing` (`a`, `b`) VALUES (profile.42,profile.42)
INSERT INTO `#__testing` (`a`, `b`) VALUES ('profile.42','profile.42')
$db->setQuery("INSERT INTO `#__testing` ( `a`, `b` ) VALUES ( " . $db->quote( $asset ) . ", " . $db->quote( $asset ) . " )");
$_PLUGINS->trigger( 'activity_onAfterCreateComment', array( $this ) );
$asset = [var1_asset];
$asset = '[var1_asset]';
Please Log in to join the conversation.