Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

dieustryth

macrumors newbie
Original poster
Aug 10, 2011
1
0
I was following the instructions here and adapting it for messages from my old Nokia - I've now got the messages onto my iPhone but they're all grouped rather oddly. I've got six message groups (for six contacts) and while each group has the appropriate messages from that person, they also have various others from other contacts who should have their own group. All the messages are also all showing up as received, including the ones I've sent.

Since there are six groups on my iPhone I suspect it has to do with my msg_group SQL statements (since my initial code started with six when I copied it from my iPhone as a template) but I'm not sure how to modify these values to fit my data. These are the six statements (+ CREATE):

Code:
CREATE TABLE msg_group (ROWID INTEGER PRIMARY KEY AUTOINCREMENT, type INTEGER, newest_message INTEGER, unread_count INTEGER, hash INTEGER);
INSERT INTO msg_group VALUES(1,0,1,0,389976927);
INSERT INTO msg_group VALUES(2,0,2,0,-1357873683);
INSERT INTO msg_group VALUES(3,0,12,0,-1768330111);
INSERT INTO msg_group VALUES(4,0,7,0,1071076036);
INSERT INTO msg_group VALUES(5,0,17,0,1208485514);
INSERT INTO msg_group VALUES(6,0,19,0,1181925699);

I'm not sure what the newest_message or hash values should be or how I would find/generate them from my old messages? Or could another section be causing the error? Thank you. (I have never handled databases before so I'm learning as I go, apologies if this doesn't make any sense or if I'm not providing enough information.)

EDIT: I managed to get them all sorted into appropriate groups. However, new messages are being sorted into new groups instead of into the pre-existing ones. Also, every time I send a message the 'unread message' count increases. Is there any way I can fix these problems?
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.