Sign up to create your own snipts, or login.

Public snipts » count The latest public count snipts.

showing 1-7 of 7 snipts for count
  • Returns the number of results
    <?php echo $wp_query->found_posts; ?>
    

    copy | embed

    0 comments - tagged in  posted by depi on Mar 02, 2010 at 4:13 p.m. EST
  • Count Monthly/Yearly Totals in MySQL
    SELECT 
          MONTHNAME(createDt) AS month,
          YEAR(createDt) AS year,
          COUNT(*) AS total
    FROM tracking
    GROUP BY MONTH(createDt), YEAR(createDt)
    ORDER BY id
    

    copy | embed

    0 comments - tagged in  posted by robertbanh on Jan 21, 2010 at 5:01 p.m. EST
  • count how many pdf or chm files are there in endnote
    ls -R -l /Users/sixinghuang/Documents/My\ EndNote\ Library.Data | egrep "\.pdf|\.chm" | wc -l
    

    copy | embed

    0 comments - tagged in  posted by dgg32 on Jan 02, 2010 at 9:17 p.m. EST
  • Count Files and Folders
    ls -l | wc -l
    

    copy | embed

    0 comments - tagged in  posted by winker on May 15, 2009 at 2:28 a.m. EDT
  • Méthode pour compter les résultats depuis un SELECT utilisant une clause LIMIT
    SELECT SQL_CALC_FOUND_ROWS * FROM tbl_name
    WHERE id > 100 LIMIT 10;
    SELECT FOUND_ROWS();
    

    copy | embed

    0 comments - tagged in  posted by joanfabregat on Apr 13, 2009 at 6:20 p.m. EDT
  • Table sizes
    DECLARE @TableName VARCHAR(100)    --For storing values in the cursor
    
    --Cursor to get the name of all user tables from the sysobjects listing
    DECLARE tableCursor CURSOR
    FOR 
    select [name]
    from dbo.sysobjects 
    where  OBJECTPROPERTY(id, N'IsUserTable') = 1
    FOR READ ONLY
    
    --A procedure level temp table to store the results
    CREATE TABLE #TempTable
    (
        tableName varchar(100),
        numberofRows int,
        reservedSize varchar(50),
        dataSize varchar(50),
        indexSize varchar(50),
        unusedSize varchar(50)
    )
    
    --Open the cursor
    OPEN tableCursor
    
    --Get the first table name from the cursor
    FETCH NEXT FROM tableCursor INTO @TableName
    
    --Loop until the cursor was not able to fetch
    WHILE (@@Fetch_Status >= 0)
    BEGIN
        --Dump the results of the sp_spaceused query to the temp table
        INSERT  #TempTable
            EXEC sp_spaceused @TableName
    
        --Get the next table name
        FETCH NEXT FROM tableCursor INTO @TableName
    END
    
    --Get rid of the cursor
    CLOSE tableCursor
    DEALLOCATE tableCursor
    
    --Select all records so we can use the reults
    SELECT * 
    FROM #TempTable order by numberofRows desc
    
    --Final cleanup!
    DROP TABLE #TempTable
    

    copy | embed

    0 comments - tagged in  posted by DavidV on Feb 20, 2009 at 2:50 a.m. EST
  • Table row count
    SELECT 
        [TableName] = so.name, 
        --[RowCount] = MAX(si.rows)
        *
    FROM 
        sysobjects so, 
        sysindexes si 
    WHERE 
        so.xtype = 'U' 
        AND 
        si.id = OBJECT_ID(so.name) 
    --GROUP BY 
    --    so.name 
    ORDER BY 
        2 DESC
    

    copy | embed

    0 comments - tagged in  posted by DavidV on Feb 20, 2009 at 2:50 a.m. EST
Sign up to create your own snipts, or login.