comparison artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java @ 151:3d70de111af1

Bugfix: Replaced wrong SQL statements with the correct ones. artifacts/trunk@1376 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 03 Mar 2011 08:04:57 +0000
parents 101a52d3ad08
children bf596b83d984
comparison
equal deleted inserted replaced
150:78a27a6b3f1f 151:3d70de111af1
944 stmnt.execute(); 944 stmnt.execute();
945 stmnt.close(); stmnt = null; 945 stmnt.close(); stmnt = null;
946 946
947 // delete the collections of the user 947 // delete the collections of the user
948 948
949 stmnt = conn.prepareStatement(SQL_USERS_COLLECTIONS); 949 stmnt = conn.prepareStatement(SQL_USERS_DELETE_COLLECTIONS);
950 stmnt.setInt(1, id); 950 stmnt.setInt(1, id);
951 stmnt.execute(); 951 stmnt.execute();
952 stmnt.close(); stmnt = null; 952 stmnt.close(); stmnt = null;
953 953
954 // delete the user 954 // delete the user
995 } 995 }
996 996
997 DataSource dataSource = DBConnection.getDataSource(); 997 DataSource dataSource = DBConnection.getDataSource();
998 try { 998 try {
999 conn = dataSource.getConnection(); 999 conn = dataSource.getConnection();
1000 stmnt = conn.prepareStatement(SQL_USERS_SELECT_ID_BY_GID); 1000 stmnt = conn.prepareStatement(SQL_USERS_SELECT_GID);
1001 stmnt.setString(1, identifier); 1001 stmnt.setString(1, identifier);
1002 result = stmnt.executeQuery(); 1002 result = stmnt.executeQuery();
1003 if (!result.next()) { // no such user 1003 if (!result.next()) { // no such user
1004 return null; 1004 return null;
1005 } 1005 }

http://dive4elements.wald.intevation.org