質問編集履歴

1

php部分追記。

2019/05/21 04:32

投稿

awazon78
awazon78

スコア32

test CHANGED
File without changes
test CHANGED
@@ -55,6 +55,8 @@
55
55
  ```
56
56
 
57
57
  このような感じで、配列で取り出せれば理想です。
58
+
59
+
58
60
 
59
61
 
60
62
 
@@ -145,3 +147,43 @@
145
147
 
146
148
 
147
149
  以上になります。ご教授宜しくお願いします!
150
+
151
+
152
+
153
+
154
+
155
+ 2019/05/21 13:30 追記
156
+
157
+ --------------------------------------
158
+
159
+ 配列の時点でメモリーエラーでは?とご意見いただきましたので、SQL文を発行している箇所を追記します。
160
+
161
+ ```php
162
+
163
+ $this->db = $this->load->database('db_slave', true);
164
+
165
+
166
+
167
+ $this->db->select('user_id,MAX(date) as max_date')->from('point_history_copy');
168
+
169
+ $this->db->where("expire_date <=", 0);
170
+
171
+ $this->db->group_by('user_id');
172
+
173
+ $this->db->having('max_date <= (' . $this->time . ' - 15552000)');
174
+
175
+ $array = $this->db->get()->result_array();
176
+
177
+
178
+
179
+ return $array;
180
+
181
+ //↑returnされる前にメモリーが足りなくてエラーが出ます。
182
+
183
+ ```
184
+
185
+
186
+
187
+ そして現在
188
+
189
+ php.iniのmemory_limmitは256MBでした。