Current location: Hot Scripts Forums » Programming Languages » ASP » scripterror type mismatch (ASP & Mysql)


scripterror type mismatch (ASP & Mysql)

Reply
  #1 (permalink)  
Old 10-23-03, 03:28 AM
ordeith ordeith is offline
New Member
 
Join Date: Oct 2003
Location: Sweden
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
scripterror type mismatch (ASP & Mysql)

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 11-05-03, 11: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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP and MySQL ? rob2132 Hot Scripts Forum Questions, Suggestions and Feedback 4 08-29-08 03:22 AM
Forum/Board - MySQL = Possible? cipher PHP 7 10-07-03 04:42 AM
great product for dumping/recovering MySQL databases Dave Brown General Advertisements 1 10-03-03 08:40 AM
mysql to access aspuser25 Database 2 09-16-03 12:01 PM
MySQL with PHP question. HELP for a newbie kenfused PHP 3 08-02-03 01:53 AM


All times are GMT -5. The time now is 01:55 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.