Results 1 to 3 of 3

Thread: MySQL variable counting

  1. #1

    Thread Starter
    Fanatic Member Ruku's Avatar
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    655

    Resolved MySQL variable counting

    SQL query...

    How can I count a number of items through SQL without incrementing a variable all the time... (taking a lot of process server-side for no reason)

    For instance,

    If I have a structure named 'crack-addicts', containing a string 'name', how can I count the number of 'crack-addicts' without selecting * and doing
    Code:
    count += 1
    and stuff...

    thx for the help!

    Last edited by Ruku; Jun 29th, 2005 at 10:44 PM.

    Using VB.NET 2005/.NET 2.0, NetBeans IDE 5, Fujitsu Cobol85,
    Website: http://DreamForgery.com

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: MySQL variable counting

    SELECT COUNT(*) FROM crack-addicts
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    Fanatic Member Ruku's Avatar
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    655

    Re: MySQL variable counting

    thx!

    Using VB.NET 2005/.NET 2.0, NetBeans IDE 5, Fujitsu Cobol85,
    Website: http://DreamForgery.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width