i hope this is the correct platform to ask this.
i am doing a c++ application that incorporates qmysql, i am using qt. i have two qline edit fields being name and password. after the user has entered these two i want to use them for login. i have this query
query.prepare("SELECT Type FROM users WHERE Name = "+loginName+" AND Password = "+ loginPassword);
where could my error be. it compiles but get an error that says
"incorrect syntax near 'AND password =
liphoso 0 Light Poster
Moschops 683 Practically a Master Poster Featured Poster
liphoso 0 Light Poster
Moschops 683 Practically a Master Poster Featured Poster
gusano79 247 Posting Shark
liphoso 0 Light Poster
gusano79 247 Posting Shark
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.