摘要:
24.1.4.3 How Can I Get the Unique ID for the Last InsertedRow?/*********** the following is from manual of MySQL ************/If you insert a record in a table containing a column that has the AUTO_INCREMENT attribute,you can get the most recently generated ID by calling the mysql_insert_id() functi 阅读全文
摘要:
//除了按照mysql 外,还需要 MySQL connector for C++ , MySQL database client library//否则 出现 error mysql.h no such file or directory#include <stdlib.h>#include <mysql/mysql.h>#include <stdio.h>int main(int arg, char **argv){ char *user = "root", *pwd = "password", *dbname = 阅读全文