...and better don't use the asterisk in conjunction with query.value(1). If You later change your table layout, the code will behave incorrect. Use "SELECT `myColumnNameWhichIWant`..." and query.value(0) in your case.

Lykurg