summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/menu.c b/menu.c
index 7c90606..e44043c 100644
--- a/menu.c
+++ b/menu.c
@@ -34,6 +34,7 @@ cMenuDb::cMenuDb()
useeventsDb = 0;
selectTimers = 0;
+ selectEventById = 0;
selectMaxUpdSp = 0;
selectTimerById = 0;
selectActiveVdrs = 0;
@@ -165,6 +166,25 @@ int cMenuDb::initDb()
status += selectTimers->prepare();
+ // select event by useid
+
+ selectEventById = new cDbStatement(useeventsDb);
+
+ // select * from eventsview
+ // where useid = ?
+ // and updflg in (.....)
+
+ selectEventById->build("select ");
+ selectEventById->bindAllOut();
+ selectEventById->build(" from %s where ", useeventsDb->TableName());
+ selectEventById->bind("USEID", cDBS::bndIn | cDBS::bndSet);
+ selectEventById->build(" and %s in (%s)",
+ useeventsDb->getField("UPDFLG")->getDbName(),
+ Us::getNeeded());
+
+ status += selectEventById->prepare();
+
+
// select
// t.*,
// t.day + t.starttime div 100 * 60 * 60 + t.starttime % 100 * 60,
@@ -403,6 +423,7 @@ int cMenuDb::exitDb()
cParameters::exitDb();
delete timerDb; timerDb = 0;
+ delete selectEventById; selectEventById = 0;
delete vdrDb; vdrDb = 0;
delete timerDoneDb; timerDoneDb = 0;
delete userDb; userDb = 0;