diff options
author | Judd Vinet <judd@archlinux.org> | 2006-07-06 05:52:28 +0200 |
---|---|---|
committer | Judd Vinet <judd@archlinux.org> | 2006-07-06 05:52:28 +0200 |
commit | ab3b5e0eac5c557843716ab44ba44e49603f5d65 (patch) | |
tree | 97e728dfacba58a97955d3e0e275c215e15ac016 /pkgdb2-del.c | |
parent | bcb6418ab38e36505cbdec8205574c0aecdb4c2b (diff) | |
download | dbscripts-ab3b5e0eac5c557843716ab44ba44e49603f5d65.tar.gz dbscripts-ab3b5e0eac5c557843716ab44ba44e49603f5d65.tar.xz |
updated for new arch db schema
Diffstat (limited to 'pkgdb2-del.c')
-rw-r--r-- | pkgdb2-del.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkgdb2-del.c b/pkgdb2-del.c index 36c8553..78b81fd 100644 --- a/pkgdb2-del.c +++ b/pkgdb2-del.c @@ -1,4 +1,4 @@ -/* $Id: pkgdb2-del.c,v 1.1 2006/07/06 03:37:01 judd Exp $ */ +/* $Id: pkgdb2-del.c,v 1.2 2006/07/06 03:52:28 judd Exp $ */ #include <stdio.h> #include <stdlib.h> @@ -114,7 +114,7 @@ int main(int argc, char **argv) } /* get the package id */ snprintf(query, sizeof(query), "SELECT id FROM packages WHERE " - "repoid='%d' AND pkgname='%s'", repoid, addslashes(name)); + "repo_id='%d' AND pkgname='%s'", repoid, addslashes(name)); result = doquery(&db, query); if(mysql_num_rows(result) == 0) { fprintf(stderr, "pkgdb2-del: %s was not found in repo %d\n", name, repoid); @@ -126,9 +126,9 @@ int main(int argc, char **argv) fprintf(stderr, "pkgdb2-del: deleting %s (id %d)\n", name, pkgid); snprintf(query, sizeof(query), "DELETE FROM packages WHERE id='%d'", pkgid); doquery(&db, query); - snprintf(query, sizeof(query), "DELETE FROM packages_files WHERE id='%d'", pkgid); + snprintf(query, sizeof(query), "DELETE FROM packages_files WHERE pkg_id='%d'", pkgid); doquery(&db, query); - snprintf(query, sizeof(query), "DELETE FROM todolist_pkgs WHERE pkgid='%d'", pkgid); + snprintf(query, sizeof(query), "DELETE FROM todolists_pkgs WHERE pkg_id='%d'", pkgid); doquery(&db, query); } |