From: zacheiss Date: Tue, 26 Feb 2002 09:00:14 +0000 (+0000) Subject: Get the mach_id and list_id the right way. X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/commitdiff_plain/53a1afb6f1b76c3fd2235f1542a5db836507f6ad Get the mach_id and list_id the right way. --- diff --git a/server/increment.pc b/server/increment.pc index 9c10b04c..bb1f26be 100644 --- a/server/increment.pc +++ b/server/increment.pc @@ -219,8 +219,10 @@ void incremental_before(enum tables table, char *qual, char **argv) else if (!strcmp(before[1], "MACHINE")) { id_to_name(id, MACHINE_TABLE, &name2); - EXEC SQL SELECT mach_id INTO :before[9] FROM machine + EXEC SQL SELECT list_id INTO :before[9] FROM list WHERE name = :name; + sprintf(before[10], "%d", id); + beforec = 11; } strcpy(before[2], name2); free(name); @@ -382,8 +384,10 @@ void incremental_after(enum tables table, char *qual, char **argv) else if (!strcmp(after[1], "MACHINE")) { id_to_name(id, MACHINE_TABLE, &name2); - EXEC SQL SELECT mach_id INTO :after[9] FROM machine + EXEC SQL SELECT list_id INTO :after[9] FROM list WHERE name = :name; + sprintf(after[10], "%d", id); + afterc = 11; } strcpy(after[2], name2); free(name);