|
-
Apr 20th, 2007, 02:54 AM
#1
Thread Starter
Lively Member
[RESOLVED] Comparing variable with rows in database?
Hi,
I have an application in which i have to collect a value in variable and compare with a field in database which has many rows or entries. For example variable is a string called 'name'. Now this variable will be compared with a field in database which has many rows of names in it. If value of any row matches with the value of 'name' it will give a message name already exists. If not then a new row will be added.
Basically i have an idea to do it, i will get the number of rows in a variable, run a loop with counter in it. In that i will put the if else codition. But my deliemma is how do i count the number of rows and how do i introduce a loop.
Please need help on this ASAP.
Regards,
Kaushik
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|