src/SearchBundle/objects/db/TShopSearchQuery.class.php
public function NumberOfRecordsLeftToIndex()
    {
        $iCount = 0;
        if ($this->fieldIndexRunning) {
            $sIndexTableName = $this->GetIndexRawTableName();
            $query = "SHOW TABLES LIKE '".MySqlLegacySupport::getInstance()->real_escape_string($sIndexTableName)."'";
            $tRes = MySqlLegacySupport::getInstance()->query($query);
            $bTableExists = (MySqlLegacySupport::getInstance()->num_rows($tRes) >= 1);
            if ($bTableExists) {
                $query = 'SELECT COUNT(sysid) AS reccount FROM `'.MySqlLegacySupport::getInstance()->real_escape_string($sIndexTableName).'`';
                if ($trow = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query))) {
                    $iCount = $trow['reccount'];
                }
            }
            if ($iCount < 1) {
                $this->StopIndex();
            }
        }

        return $iCount;
    }
public function NumberOfRecordsLeftToIndex()
    {
        $iCount = 0;
        if ($this->fieldIndexRunning) {
            $sIndexTableName = $this->GetIndexRawTableName();
            $query = "SHOW TABLES LIKE '".MySqlLegacySupport::getInstance()->real_escape_string($sIndexTableName)."'";
            $tRes = MySqlLegacySupport::getInstance()->query($query);
            $bTableExists = (MySqlLegacySupport::getInstance()->num_rows($tRes) >= 1);
            if ($bTableExists) {
                $query = 'SELECT COUNT(sysid) AS reccount FROM `'.MySqlLegacySupport::getInstance()->real_escape_string($sIndexTableName).'`';
                if ($trow = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query))) {
                    $iCount = $trow['reccount'];
                }
            }
            if ($iCount < 1) {
                $this->StopIndex();
            }
        }

        return $iCount;
    }
public function NumberOfRecordsLeftToIndex ( ) { $ iCount = 0 ; if ( $ this -> fieldIndexRunning ) { $ sIndexTableName = $ this -> GetIndexRawTableName ( ) ; $ query = "SHOW TABLES LIKE '" . MySqlLegacySupport :: getInstance ( ) -> real_escape_string ( $ sIndexTableName ) . "'" ; $ tRes = MySqlLegacySupport :: getInstance ( ) -> query ( $ query ) ; $ bTableExists = ( MySqlLegacySupport :: getInstance ( ) -> num_rows ( $ tRes ) >= 1 ) ; if ( $ bTableExists ) { $ query = 'SELECT COUNT(sysid) AS reccount FROM `' . MySqlLegacySupport :: getInstance ( ) -> real_escape_string ( $ sIndexTableName ) . '`' ; if ( $ trow = MySqlLegacySupport :: getInstance ( ) -> fetch_assoc ( MySqlLegacySupport :: getInstance ( ) -> query ( $ query ) ) ) { $ iCount = $ trow [ 'reccount' ] ; } } if ( $ iCount < 1 ) { $ this -> StopIndex ( ) ; } } return $ iCount ; }
returns the number of records that still need to be indext for the query
will stop the index if no entries are left to index.

@return int
returns the number of records that still need to be indext for the query will stop the index if no entries are left to index .