Home > Database > Mysql Tutorial > 自制的一个操作sqlite数据库的库文件

自制的一个操作sqlite数据库的库文件

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 16:19:29
Original
1022 people have browsed it

#ifndef _SQLITE3LIB_H_ #define _SQLITE3LIB_H_ #include stdio.h #include stdlib.h #includesqlite3.h typedef struct { char **result; int row; int col; char *errmsg; }sqliteResSet; /* *功能:执行sql语句,调用成功时,返回0,并释放errmsg,适用

#ifndef _SQLITE3LIB_H_

#define _SQLITE3LIB_H_

 

#include

#include

#include

 

typedef struct

{

    char **result;

    int row;

    int col;

    char *errmsg;

}sqliteResSet;

 

/*

*功能:执行sql语句,调用成功时,,返回0,并释放errmsg,适用于执行“增删改”类型的sql语句

*db:要进行操作的数据库,不需要先打开

*errmsg:执行sql语句时如果发生错误所返回的信息

*/

int sqlite3_carrySql(const char *db, const char *sql, char *errmsg);

 

 

/*

*功能:执行查询的sql语句,查询成功时,返回0,并将一个结果集存储到table中

*db:要进行操作的数据库,不需要先打开

*/

int sqlite3_getResSet(const char *db, const char *sql, sqliteResSet *table);

 

 

#endif   /*_SQLITE3LIB_H_*/

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template