wrong database field

This commit is contained in:
Enno Rehling 2002-11-02 15:52:07 +00:00
parent 8656f65fa0
commit 0b526d533d
4 changed files with 37 additions and 11 deletions

View File

@ -1,12 +1,38 @@
TARGETS = subdirs MODULES := common eressea common/triggers common/items common/spells common/races common/attributes common/gamecode common/kernel common/util common/modules
SUBDIRS = \ CC = gcc
common \ CFLAGS += -Wall -Wwrite-strings -Wstrict-prototypes \
eressea \ -Werror-implicit-function-declaration \
mapper -Wno-char-subscripts
# askalon # look for include files in
# each of the modules
CFLAGS += -I/cygwin/usr/include
CFLAGS += -I.
CFLAGS += $(patsubst %,-I%,$(MODULES))
# extra libraries if required
LIBS :=
# each module will add to this
SRC :=
include Makefile.include # include the description for
# each module
include $(patsubst %,%/module.mk,$(MODULES))
# determine the object files
OBJ := $(patsubst %.c,%.o, $(filter %.c,$(SRC))) \
$(patsubst %.y,%.o, $(filter %.y,$(SRC)))
# link the program
eressea: $(OBJ)
$(CC) -o $@ $(OBJ) $(LIBS)
## more definitions %.o: %.c
@echo Compiling $@
@$(CC) $(CFLAGS) -c -o $@ $<
# include the C include
# dependencies
include $(OBJ:.o=.d)
# calculate C include
# dependencies
%.d: %.c
gcc -MM -MG $(CFLAGS) $< > $@

View File

@ -2624,7 +2624,7 @@ renumber_factions(void)
a_remove(&f->attribs, rp->attrib); a_remove(&f->attribs, rp->attrib);
if (updatelog) fprintf(updatelog, "renum %s %s\n", itoa36(f->no), itoa36(rp->want)); if (updatelog) fprintf(updatelog, "renum %s %s\n", itoa36(f->no), itoa36(rp->want));
if (f->subscription) fprintf(sqlstream, "UPDATE subscriptions set faction='%s' where " if (f->subscription) fprintf(sqlstream, "UPDATE subscriptions set faction='%s' where "
"subscription=%u;\n", itoa36(rp->want), "id=%u;\n", itoa36(rp->want),
f->subscription); f->subscription);
f->no = rp->want; f->no = rp->want;
register_faction_id(rp->want); register_faction_id(rp->want);

View File

@ -2400,7 +2400,7 @@ remove_empty_factions(boolean writedropouts)
} }
} }
if (f->subscription) fprintf(sqlstream, "UPDATE subscriptions set status='DEAD' where " if (f->subscription) fprintf(sqlstream, "UPDATE subscriptions set status='DEAD' where "
"subscription=%u\n;", f->subscription); "id=%u\n;", f->subscription);
*fp = f->next; *fp = f->next;
/* stripfaction(f); /* stripfaction(f);

View File

@ -587,7 +587,7 @@ confirm_newbies(void)
while (f) { while (f) {
if (!fval(f, FFL_DBENTRY)) { if (!fval(f, FFL_DBENTRY)) {
if (f->subscription) { if (f->subscription) {
fprintf(sqlstream, "UPDATE subscriptions SET status='ACTIVE', faction='%s' WHERE subscription=%u;\n", itoa36(f->no), f->subscription); fprintf(sqlstream, "UPDATE subscriptions SET status='ACTIVE', faction='%s' WHERE id=%u;\n", itoa36(f->no), f->subscription);
fset(f, FFL_DBENTRY); fset(f, FFL_DBENTRY);
} }
} }