#include <stdio.h>
#include <mysql.h>
int main(int argc, char **argv) {
MYSQL mysql_conn; /* Connection handle */
MYSQL_RES *mysql_result; /* Result handle */
MYSQL_ROW mysql_row; /* Row data */
int f1, f2, num_row, num_col;
if (mysql_init(&mysql_conn) != NULL) {
if (mysql_real_connect(&mysql_conn, "localhost", "root", "666666", "cityman", MYSQL_PORT, NULL, 0) != NULL) {
if (mysql_query(&mysql_conn, "select * from person") == 0) {
mysql_result = mysql_store_result(&mysql_conn); // get the result from the executing select query
num_row = mysql_num_rows(mysql_result); /* Get the