original_string: public function getIdsAction($actionsNameAndType)
      {
          $sql = "SELECT MIN(idaction) as idaction, type, name FROM " . Common::prefixTable('log_action')
               . " WHERE";
          $bind = array();
  
          $i = 0;
          foreach ($actionsNameAndType as $actionNameType) {
              $name = $actionNameType['name'];
  
              if (empty($name)) {
                  continue;
              }
  
              if ($i > 0) {
                  $sql .= " OR";
              }
  
              $sql .= " " . $this->getSqlConditionToMatchSingleAction() . " ";
  
              $bind[] = $name;
              $bind[] = $name;
              $bind[] = $actionNameType['type'];
              $i++;
          }
  
          $sql .= " GROUP BY type, hash, name";
  
          // Case URL & Title are empty
          if (empty($bind)) {
              return false;
          }
  
          $actionIds = $this->getDb()->fetchAll($sql, $bind);
  
          return $actionIds;
      }
code: public function getIdsAction($actionsNameAndType)
      {
          $sql = "SELECT MIN(idaction) as idaction, type, name FROM " . Common::prefixTable('log_action')
               . " WHERE";
          $bind = array();
  
          $i = 0;
          foreach ($actionsNameAndType as $actionNameType) {
              $name = $actionNameType['name'];
  
              if (empty($name)) {
                  continue;
              }
  
              if ($i > 0) {
                  $sql .= " OR";
              }
  
              $sql .= " " . $this->getSqlConditionToMatchSingleAction() . " ";
  
              $bind[] = $name;
              $bind[] = $name;
              $bind[] = $actionNameType['type'];
              $i++;
          }
  
          $sql .= " GROUP BY type, hash, name";
  
          // Case URL & Title are empty
          if (empty($bind)) {
              return false;
          }
  
          $actionIds = $this->getDb()->fetchAll($sql, $bind);
  
          return $actionIds;
      }
code_tokens: public function getIdsAction ( $ actionsNameAndType ) { $ sql = "SELECT MIN(idaction) as idaction, type, name FROM " . Common :: prefixTable ( 'log_action' ) . " WHERE" ; $ bind = array ( ) ; $ i = 0 ; foreach ( $ actionsNameAndType as $ actionNameType ) { $ name = $ actionNameType [ 'name' ] ; if ( empty ( $ name ) ) { continue ; } if ( $ i > 0 ) { $ sql .= " OR" ; } $ sql .= " " . $ this -> getSqlConditionToMatchSingleAction ( ) . " " ; $ bind [ ] = $ name ; $ bind [ ] = $ name ; $ bind [ ] = $ actionNameType [ 'type' ] ; $ i ++ ; } $ sql .= " GROUP BY type, hash, name" ; // Case URL & Title are empty if ( empty ( $ bind ) ) { return false ; } $ actionIds = $ this -> getDb ( ) -> fetchAll ( $ sql , $ bind ) ; return $ actionIds ; }
docstring: Returns the IDs for multiple actions based on name + type values.
  
  @param array $actionsNameAndType Array like `array( array('name' => '...', 'type' => 1), ... )`
  @return array|false Array of DB rows w/ columns: **idaction**, **type**, **name**.
docstring_tokens: Returns the IDs for multiple actions based on name + type values .