PDA

View Full Version : search in sql?



fantom
16th May 2012, 14:31
I would like to ask your help and a few example codelines about the following:
I receive a message from a client, i tokenize the information and i include them in qstrings. One of them is the deviceNr. I have an sql db and one of the tables has the DEVICENR column. How i can search withing this column from my qt application if the deviceNr i receive is existing to the respective column?

Could you please give me an example?

Thanks

ChrisW67
17th May 2012, 00:42
Marry the simple SQL statement:


select DEVICENR from TABLE where DEVICENR = ?

with the information imparted by the SQL in Qt information, the SQL Examples and the quite helpful QSqlQuery documentation.