Bakeel wrote:
Correct
No it's not. Aside from the fact that you haven't asked a question - unless "correct" was an extremely rude demand for someone to "fix" your code? * - this code is not "correct". It is vulnerable to SQL Injection[^]. NEVER use string concatenation/interpolation to build a SQL query. ALWAYS use a parameterized query. Everything you wanted to know about SQL injection (but were afraid to ask) | Troy Hunt[^] How can I explain SQL injection without technical jargon? | Information Security Stack Exchange[^] Query Parameterization Cheat Sheet | OWASP[^] * If it was a demand, then prepare to kiss goodbye to your account. Dumping 100+ lines of unexplained code and demanding that we "correct" it for you, particularly when you haven't explained what needs "correcting", is a great way to get kicked off the site for being a troll. This forum is manned by unpaid volunteers, who are not your personal slaves. We have better things to do with our time than deal with such rude demands.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer