Forums

This topic is locked

Check if a string is in a db table

Posted 18 Sep 2002 16:56:15
1
has voted
18 Sep 2002 16:56:15 Matthijs Horsman posted:
OK, i will try to explain my problem..

I have a calendar on my page, just simple with some ASP....

A user can enter some stuff that belongs to that date. That goes right in to the database.
Now when i display the calendar i want to check for every date if they entered someting for that date.

So i want to compare the column "date" from my database, with the string from the calendar, which is in a loop.
if i use the line

<% if mydatabasefield = mystring then do something %> then it will compare it with the first record in my database instead of all the records....

So i think it will be something like
For <%mydatabse field%> if <%mydatabase field%> = <% mystring %> then do something <% end if %>

I somebody understands what i am saying here, a little help or hints will be very welcome

Thnx in advance

Matthijs
----------------
DWMX/W-XP-PRO/IIS/ASP-VB
www.chaps.nl

Edited by - matthijshorsman on 18 Sep 2002 16:59:39

Reply to this topic