Thank you spirit for the vary fast replay..
I Have toke the \n out of the code..
its now look like this
query.prepare("SELECT COUNT(*) AS 'numberOfUsers' FROM users AS u);
query.prepare("SELECT COUNT(*) AS 'numberOfUsers' FROM users AS u);
To copy to clipboard, switch view to plain text mode
but id did get any count(*)..
There is no problem with the SQL statement.
It just that the line.
numberOfPages = query.value(0).toInt();
numberOfPages = query.value(0).toInt();
To copy to clipboard, switch view to plain text mode
Wont gave me the number at all..
if the SQL Statement has got more than one field back it will work.
But that will make the program slow and to get something like 500
Regards
Bookmarks