cgi代码:
#include
#include
#include
int main()
{
sqlite3 *pdb=NULL;
sqlite3_stmt *stmt;
char *szErrMsg=0;
int rc,i;
rc=sqlite3_open("/home/dyh/date.db",&pdb);
if(rc)
{
fprintf(stderr,"can't open database: %s",sqlite3_errmsg(pdb));
sqlite3_close(pdb);
return -1;
}
printf("Content-type:text/html\n\n");
printf("\n
\ntest\n\n");printf("
dongtai
\n");printf("
printf("
\n");printf("
iddevwendutime\n");printf("
\n");char sql[512];
//char *sql="select *from wsd where id=(select max(id)from wsd where dnum=1)";
int j=1;
for(;j<=3;j++)
{
s