SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    May 2004
    Location
    uk
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    whats wrong with this (count sql)

    set rstotalcustomers = conn.execute("Select COUNT(username) as Total from users WHERE sponsor = '" & membersid & "and WHERE upgraded =1'")

  2. #2
    HardCoder md_irfan_amu's Avatar
    Join Date
    May 2005
    Location
    Asia
    Posts
    215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use this..........
    set rstotalcustomers = conn.execute("Select COUNT(username) as Total from users WHERE sponsor = '" & membersid & "' and upgraded =1'")

    Let me know it works or not....
    Irfan
    Find Tutors Easyway to get connect with your tutor in india

  3. #3
    SitePoint Member
    Join Date
    May 2004
    Location
    uk
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    will try cheers

  4. #4
    SitePoint Member
    Join Date
    May 2004
    Location
    uk
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Syntax error in string in query expression 'sponsor = '' and upgraded =1''.

  5. #5
    SitePoint Enthusiast
    Join Date
    Feb 2005
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    set rstotalcustomers = conn.execute("Select COUNT(username) as Total from users WHERE sponsor = '" & membersid & "' and upgraded =1")

    You had an extra quote in there. This should work.


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
  •