Hi !!! I have a table with two columns. The first column is called 'Login', the second column is called 'Password'. I wish with help of some query to extract how many rеcords I have in this columns. I use 'SELECT COUNT(*) FROM TableName WHERE Login = @login AND Password = @password'. However this query always returns the same result no matter is the parameters exist or not. ??? Sorry for my bad English.
destruct0
7
Junior Poster in Training
Recommended Answers
Jump to Post'select count(login) from mytable'
Jump to Postso in this case you will always get zero, or at maximum one output - because you want to count how many users has "exactly this" name, and "exactly this" password.
I dont get it really what are you trying to count here. If All the code is good, …
All 7 Replies
Mitja Bonca
557
Nearly a Posting Maven
destruct0
7
Junior Poster in Training
Mitja Bonca
557
Nearly a Posting Maven
jugosoft
25
Junior Poster in Training
destruct0
7
Junior Poster in Training
Mitja Bonca
557
Nearly a Posting Maven
destruct0
7
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.