I am using the C API with MySQL 4.0.17 on QNX 6.2.1b. I want to update the rows that are returned as I get them. Is this possible. Here's a simplified version of what I am trying to do:
query = "select seqNo, priority from packet where timestamp < now() - interval 15 second order by priority desc, timestamp"; mysql_query(&mysql, query); result = mysql_use_result(&mysql); while (row = mysql_fetch_row(result)) { seqNo = atoi(row[0]); priority = atoi(row[1]); sprintf(updateStr, "update packet set timestamp = now() where seqNo = %d", seqNo); mysql_query(&mysql, updateStr); } However, when I do this, I get: Commands out of sync; You can't run this command now Anyone have any ideas on how to to accomplish this? ...Stephen -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]