I am trying to learn to use the C API for MySQL and have a question. I have a table that has a primary key defined as int(11). I don't know what data type this translates to in C. I thought maybe an unsigned int or an unsigned long. I have this little loop that cycles through the results of a query and displays the first two columns, the first being the int(11) and the second a varchar. Here is the code:
result = mysql_use_result(&mysql); while((row = mysql_fetch_row(result))) { printf("%lu %s\n", row[0], row[1]); } The first column is printed as garbage while the second column shows the data correctly. Help? Thanks. Andrew -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]