DataMapper 1.6.0 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: DataMapper 1.6.0 (/showthread.php?tid=11358) Pages:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
DataMapper 1.6.0 - El Forum - 01-23-2009 [eluser]OES[/eluser] So I would have an array of users and country in a list ie. Joe Bloggs - USA Joe Smith - United Kingdom Etc DataMapper 1.6.0 - El Forum - 01-23-2009 [eluser]tdktank59[/eluser] try this Code: $u = new User(); DataMapper 1.6.0 - El Forum - 01-23-2009 [eluser]OES[/eluser] Thats excatly the same as what I had ?? DataMapper 1.6.0 - El Forum - 01-23-2009 [eluser]tdktank59[/eluser] post your models for user and country DataMapper 1.6.0 - El Forum - 01-23-2009 [eluser]OES[/eluser] Here are the models and controller. http://stikked.com/view/62619868 Thank you DataMapper 1.6.0 - El Forum - 01-23-2009 [eluser]tdktank59[/eluser] you dont have this part on the controller Code: foreach ($u->all as $user) otherwise its not printing anything.... DataMapper 1.6.0 - El Forum - 01-23-2009 [eluser]OES[/eluser] Like I have said I get the sQL error as per my first post. So no point outputting anything when I got errors :-). I know normal get works just for users with no errors and I have done foreach no problem with that data. DataMapper 1.6.0 - El Forum - 01-23-2009 [eluser]tdktank59[/eluser] just to make sure you did update your mysql driver? if no check out the troubleshooting in the manual. BTW do you have an instant messenger so we stop spamming the board? DataMapper 1.6.0 - El Forum - 01-23-2009 [eluser]tdktank59[/eluser] Solution was to update the mysql driver.... DataMapper 1.6.0 - El Forum - 01-23-2009 [eluser]robertcsmith[/eluser] @tdtank Without diving into it too much something is amuck with autotransactions as turning it off in the datamapper config using similar models worked perfectly controller Code: $b = new Brainstorm(); A Debug shows that DataMapper line 614 Code: $this->id = $this->db->insert_id(); returns an id of 0 but with the config set to false it properly returns the id of the newly created record so yeah... something is amuck in the driver i think? |