View Single Post
  #2 (permalink)  
Old 11-05-03, 10:44 AM
selwonk selwonk is offline
Newbie Coder
 
Join Date: Nov 2003
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
You might need to output your COUNT() to a valid SQL variable name and specify a field to count:

Code:
query="SELECT COUNT(ID) AS Total FROM calltable WHERE phonenumber='"&request("phonenumber")&"' AND campaignid=130"
Then once you execute your query you can look at a variable called Total in your resultant recordset

Quote:
Originally Posted by ordeith
query="SELECT COUNT(*) FROM calltable WHERE phonenumber='"&request("phonenumber")&"' AND campaignid=130"

if conn.execute(query) > 0 then

I get a type mismatch on this row.
And yes phonenumber is textformatted in the db and the query works in MySQL tried it via phpMyAdmin.

Help please
__________________
selwonk
Reply With Quote