SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: counts in a db

  1. #1
    SitePoint Zealot blackinwhite's Avatar
    Join Date
    Feb 2001
    Location
    Istanbul/Turkey
    Posts
    127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    counts in a db

    I have a table tblpeople,and columns peopleid, idcreated so on.

    how can I write a count of peoplein the db.

  2. #2
    SitePoint Evangelist
    Join Date
    Jun 2001
    Location
    London
    Posts
    423
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try...


    select count(peopleid) as 'COUNT' from tblpeople


    and just read the field 'COUNT' as if a column field to retrieve the value.

    hope this works....a bit rusty...

  3. #3
    SitePoint Zealot blackinwhite's Avatar
    Join Date
    Feb 2001
    Location
    Istanbul/Turkey
    Posts
    127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just worrying about deleting someone, so the count will not change?


Bookmarks

Posting Permissions

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