Changeset - bd756141e246
[Not reviewed]
0 1 0
Mads - 12 years ago 2013-03-20 22:46:26
mads@ab3.no
Fix typos in removeUser, making it work with postgresql
1 file changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/pqxxbackend.cpp
Show inline comments
 
@@ -353,10 +353,10 @@ bool PQXXBackend::getBuddies(long id, std::list<BuddyInfo> &roster) {
 
bool PQXXBackend::removeUser(long id) {
 
	try {
 
		pqxx::nontransaction txn(*m_conn);
 
		txn.exec("DELETE FROM " + m_prefix + "users SET id=" + pqxx::to_string(id));
 
		txn.exec("DELETE FROM " + m_prefix + "buddies SET user_id=" + pqxx::to_string(id));
 
		txn.exec("DELETE FROM " + m_prefix + "user_settings SET user_id=" + pqxx::to_string(id));
 
		txn.exec("DELETE FROM " + m_prefix + "buddies_settings SET user_id=" + pqxx::to_string(id));
 
		txn.exec("DELETE FROM " + m_prefix + "users WHERE id=" + pqxx::to_string(id));
 
		txn.exec("DELETE FROM " + m_prefix + "buddies WHERE user_id=" + pqxx::to_string(id));
 
		txn.exec("DELETE FROM " + m_prefix + "user_settings WHERE user_id=" + pqxx::to_string(id));
 
		txn.exec("DELETE FROM " + m_prefix + "buddies_settings WHERE user_id=" + pqxx::to_string(id));
 

	
 
		return true;
 
	}
0 comments (0 inline, 0 general)