db query

Results 1 to 2 of 2

Thread: db query

  1. #1
    Marty Guest

    Default db query

    How do I query a db to count the number of items per person(where employeeID=) and then display the amount beside the person's name on an ASp

  2. #2
    Join Date
    Dec 1969

    Default RE: db query

    &#060;%<BR>&#039;make connection to db<BR>sql="select count(*) as acount from tablename where employeeID=" & variable<BR>set rs=conn.execute(sql)<BR>varnum=rs("acount")<BR>res ponse.write personname & " - " & varnum<BR>set rs=nothing<BR>conn.close<BR>set conn=nothing<BR>%&#062;<BR><BR>hope this helps!!<BR>

Posting Permissions

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