public function getDuplicateIdActions()
    {
        $sql = "SELECT name, COUNT(*) AS count, GROUP_CONCAT(idaction ORDER BY idaction ASC SEPARATOR ',') as idactions
                  FROM " . Common::prefixTable('log_action') . "
              GROUP BY name, hash, type HAVING count > 1";

        $result = array();
        foreach (Db::fetchAll($sql) as $row) {
            $dupeInfo = array('name' => $row['name']);

            $idActions = explode(",", $row['idactions']);
            $dupeInfo['idaction'] = array_shift($idActions);
            $dupeInfo['duplicateIdActions'] = $idActions;

            $result[] = $dupeInfo;
        }
        return $result;
    }
public function getDuplicateIdActions()
    {
        $sql = "SELECT name, COUNT(*) AS count, GROUP_CONCAT(idaction ORDER BY idaction ASC SEPARATOR ',') as idactions
                  FROM " . Common::prefixTable('log_action') . "
              GROUP BY name, hash, type HAVING count > 1";

        $result = array();
        foreach (Db::fetchAll($sql) as $row) {
            $dupeInfo = array('name' => $row['name']);

            $idActions = explode(",", $row['idactions']);
            $dupeInfo['idaction'] = array_shift($idActions);
            $dupeInfo['duplicateIdActions'] = $idActions;

            $result[] = $dupeInfo;
        }
        return $result;
    }
public function getDuplicateIdActions ( ) { $ sql = "SELECT name, COUNT(*) AS count, GROUP_CONCAT(idaction ORDER BY idaction ASC SEPARATOR ',') as idactions
                  FROM " . Common :: prefixTable ( 'log_action' ) . "
              GROUP BY name, hash, type HAVING count > 1" ; $ result = array ( ) ; foreach ( Db :: fetchAll ( $ sql ) as $ row ) { $ dupeInfo = array ( 'name' => $ row [ 'name' ] ) ; $ idActions = explode ( "," , $ row [ 'idactions' ] ) ; $ dupeInfo [ 'idaction' ] = array_shift ( $ idActions ) ; $ dupeInfo [ 'duplicateIdActions' ] = $ idActions ; $ result [ ] = $ dupeInfo ; } return $ result ; }
Returns list of all duplicate actions in the log_action table by name and the lowest action ID.
The duplicate actions are returned with each action.

@return array Contains the following elements:

* **name**: The action's name.
* **idaction**: The action's ID.
* **duplicateIdActions**: An array of duplicate action IDs.
Returns list of all duplicate actions in the log_action table by name and the lowest action ID . The duplicate actions are returned with each action .