Hi madods,
Thanks for explaining your problem well; you may want to explicitly say you're on Windows (and the version) next time in case it matters. You could put that version information in a forum signature if you want to.
0. I don't like mysql as you constantly have to keep track of matching dll versions with connectors, I have the feeling the mysql platform/support/ubiquity is disintegrating and I like other dbs more
- hint: look at Firebird or PostgreSQL if you want to switch. However, some thoughts below.
1. Always try these SQL commands in a query tool such as phpmyadmin, mysql administrator or whatever to see if they are valid SQL. This way you can isolate problems with your code from sql problems.
2. Are you sure id is a varchar/char column? You're quoting it as if it is a text type column, while I would suspect an integer column. Instead of
select firstname from members where id='365'
code like this may make more sense:
select firstname from members where id=365
Better still, use parameterized queries, e.g. something like
select firstname from members where id=:theidparameter
see sqldb tutorial3:
http://wiki.lazarus.freepascal.org/SQLdb_Tutorial3#Parameterized_queries)
3. Strange error message. I would expect the first query to fail just as much as the second because the error message pertains to id in the WHERE clause, not the first columns. That said, perhaps the name updated is a reserved word in MySQL SQL and needs to be quoted/escaped - perhaps as `updated` but I'm not sure.
Good luck