From: Michael R. <re...@eu...> - 2004-03-20 23:25:32
|
Hi Javi, > I enclose an improved version of MySQL plugin. Fine! Already checked in into CVS, but with some modifications: - The config section is no longer called "MySQL", but "Plugin MySQL" (take a look at lcd4linux.conf.sample) - I put all section references into a global variable "Section" - I modified some of the config info/error messages to emit the correct section. - I prepared some SQL examples in the lcd4linux.conf.sample - I enclosed the MySQL-Exit function between #ifdef HAVE_MYSQL_H I hope this works, because I cannot test it... > TO DO list : > -Add a function to fetch data (not only the number of rows) from the database. > -MySQLquery() function should allow either one or two arguments, > if there is only one, use the database value from the config file, if there are two, > use the second one as the new database name. > -Add an argument to mySQLstatus funtion. > The argument will indicate what to return:Uptime, Threads, Questions,Slow queries, Flush tables,... > If uptime, return it Like: Days,hours,minutes The most imnportant thing would be a better autoconf makro which does not only check for mysql.h, but for libmyslq, too, and add this library to the CFLAGS or LFLAGS. Anybody out there who has experience with this? Anybody out there who uses programs which have a "soft dependency" to MySQL? Take a look into the configure.in and Makefile.am, maybe we can steal^H^H^H^H^Hadopt some code... bye, Michael -- Michael Reinelt Tel: +43 676 3079941 Geisslergasse 4 Fax: +43 316 692343 A-8045 Graz, Austria e-mail: re...@eu... |