What you want is the system() function which will execute a shell command.
But you still need to add your own HTML around it to be displayed by a browser as it's missing the "rest of the story". system("echo <HTML> >mm.html"); // first one creates mm.html system("echo <TABLE BORDER=1> >>mm.html"); // 2nd and subsequent append mm.html system("sqlite3 -html -header mydzh.db \"select * from dhq where ph15>10;\" >>mm.html"); system("echo </TABLE> >>mm.html"); system("echo </HTML> >>mm.html"); Michael D. Black Senior Scientist Advanced Analytics Directorate Advanced GEOINT Solutions Operating Unit Northrop Grumman Information Systems ________________________________ From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on behalf of YAN HONG YE [yanhong...@mpsa.com] Sent: Saturday, March 31, 2012 12:54 AM To: sqlite-users@sqlite.org Subject: EXT :[sqlite] about sqlite3_exec function sqlite3_exec( db, "???", 0, 0, &pErrMsg); I wanna add this following command into sqlite3_exec func: "sqlite3 -html -header mydzh.db \"select * from dhq where ph15>10;\" >mm.html" like this: sqlite3_exec( db, "-html -header \"select * from dhq where ph15>10;\" >mm.html", 0, 0, &pErrMsg); but it doesn't work _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users