01/10/2018, 10:54
Login with QT and Mysql
minh đã cố thử đăng nhập với Qt nhưng vẫn bị lỗi , ai biết cách chỉ giúp với ạ
QString username,password;
QSqlQuery query;
if (query.exec("SELECT * FROM login WHERE username='"+username+"'and password='"+password+"'"))
{
int count=0;
while(query.next()){
count++;
}
if(count==1)
{
qDebug()<<"da ket noi";
}
else{
qDebug()<<"false2";
}
Bài liên quan
đã giải quyết được .