diff options
| author | reinelt <> | 2006-01-20 15:58:05 +0000 | 
|---|---|---|
| committer | reinelt <> | 2006-01-20 15:58:05 +0000 | 
| commit | b18235a45d3cade7f862abec063f2e8121541a48 (patch) | |
| tree | efdaa21da22b860fcb680bf54a611db9fd6478c7 | |
| parent | 4651cdff898368b9a739c63028dad51af128f93e (diff) | |
| download | lcd4linux-b18235a45d3cade7f862abec063f2e8121541a48.tar.gz | |
[lcd4linux @ 2006-01-20 15:58:05 by reinelt]
MySQL::count() added again
| -rw-r--r-- | lcd4linux.conf.sample | 8 | ||||
| -rw-r--r-- | plugin_mysql.c | 11 | 
2 files changed, 10 insertions, 9 deletions
| diff --git a/lcd4linux.conf.sample b/lcd4linux.conf.sample index 06c423e..7df0053 100644 --- a/lcd4linux.conf.sample +++ b/lcd4linux.conf.sample @@ -929,7 +929,7 @@ Layout testMySQL {  #Display 'LCM-162'  #Display 'CF631'  #Display 'CF632' -Display 'CF633' +#Display 'CF633'  #Display 'Curses'  #Display 'M50530-24x8'  #Display 'LCDTerm' @@ -937,7 +937,7 @@ Display 'CF633'  #Display 'BA63'  #Display 'CT20x4'  #Display 'T6963-240x64' -#Display 'XWindow' +Display 'XWindow'  #Display 'USBLCD'  #Display 'BWCT'  #Display 'Image' @@ -945,12 +945,12 @@ Display 'CF633'  #Display 'LPH7508-serdisplib'  #Display 'LPH7508' -#Layout 'Default' +Layout 'Default'  #Layout 'L8x2'  #Layout 'L16x2'  #Layout 'L20x2'  #Layout 'Test'  #Layout 'Test2' -Layout 'TestGPO' +#Layout 'TestGPO' diff --git a/plugin_mysql.c b/plugin_mysql.c index fd35e11..1ccdb0e 100644 --- a/plugin_mysql.c +++ b/plugin_mysql.c @@ -1,4 +1,4 @@ -/* $Id: plugin_mysql.c,v 1.9 2006/01/20 15:43:25 reinelt Exp $ +/* $Id: plugin_mysql.c,v 1.10 2006/01/20 15:58:05 reinelt Exp $   *   * plugin for execute SQL queries into a MySQL DBSM.   * @@ -23,6 +23,9 @@   *   *   * $Log: plugin_mysql.c,v $ + * Revision 1.10  2006/01/20 15:58:05  reinelt + * MySQL::count() added again + *   * Revision 1.9  2006/01/20 15:43:25  reinelt   * MySQL::query() returns a value, not the number of rows   * @@ -162,9 +165,7 @@ static int configure_mysql(void)      return configured;  } -#if 0 -/* removed because you can use 'query("select count(*)")' */ -static void my_MySQLquery(RESULT * result, RESULT * query) +static void my_MySQLcount(RESULT * result, RESULT * query)  {      char *q;      double value; @@ -195,7 +196,6 @@ static void my_MySQLquery(RESULT * result, RESULT * query)      SetResult(&result, R_NUMBER, &value);  } -#endif  static void my_MySQLquery(RESULT * result, RESULT * query) @@ -259,6 +259,7 @@ static void my_MySQLstatus(RESULT * result)  int plugin_init_mysql(void)  {  #ifdef HAVE_MYSQL_MYSQL_H +    AddFunction("MySQL::count", 1, my_MySQLcount);      AddFunction("MySQL::query", 1, my_MySQLquery);      AddFunction("MySQL::status", 0, my_MySQLstatus);  #endif | 
