Current location: Hot Scripts Forums » Programming Languages » ASP » Help with an If/Then statement


Help with an If/Then statement

Reply
  #1 (permalink)  
Old 07-06-04, 05:06 PM
tbig's Avatar
tbig tbig is offline
Newbie Coder
 
Join Date: Jan 2004
Location: Massachusetts
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Help with an If/Then statement

I'm creating a messgae board, and there are seperate categories, with message boards belonging to each category. I got that far, now the problem is sorting it. All the messages board go to one category, even if its asigned to a different one. All the categories show, just the message board shows in the wrong place.

I used a If/Then statement to help sort.

"If rs1("category") = rs("id") then"
I would think that this would only show the right MB in the right place, but it doesnt.

Category is in the "forum" table and ID is in the "category" table.

Any help please?
__________________
Cheers!

TBig
Reply With Quote
  #2 (permalink)  
Old 08-02-04, 12:18 PM
Mikeirv Mikeirv is offline
Newbie Coder
 
Join Date: May 2004
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
I am guessing that the Category field in the Forum table is a varchar and the ID field in the category table is an int.

try this

If clng(rs1("category")) = rs("id") then

this will make the rs1("Category") an integer so it will match
Reply With Quote
  #3 (permalink)  
Old 08-05-04, 11:30 AM
tbig's Avatar
tbig tbig is offline
Newbie Coder
 
Join Date: Jan 2004
Location: Massachusetts
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Hey man, that did it thanks allot!
__________________
Cheers!

TBig
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
Expected end of statement tbig ASP 9 03-31-04 01:44 PM
UPDATE statement not working! aleksgurl Perl 5 11-06-03 12:40 PM
Malfunctioning switch statement and processing cstallins PHP 2 10-20-03 08:48 PM
If/else statement working...but not working mdhall PHP 13 10-16-03 08:47 AM
If then statement acting up! geneane ASP 1 09-30-03 04:32 PM


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