We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6fe6239 commit 99cfbfbCopy full SHA for 99cfbfb
Core/helpers/db_helper.php
@@ -50,7 +50,7 @@ function use_table($table = '', $model_type = 'EasyModel')
50
return $model;
51
}
52
53
- $model->table = $table;
+ $model->{'table'} = $table; // bypass dynamic property error
54
55
56
@@ -151,7 +151,7 @@ function max_id($table, $select_as=null) {
151
if($select_as != null) {
152
$maxid = ci()->db->query('SELECT MAX(id) AS '.$select_as.' FROM ' . $table)->row()->$select_as;
153
} else {
154
- $maxid = ci()->db->query('SELECT MAX(id) AS biggest FROM '. $table)->row();
+ $maxid = ci()->db->query('SELECT MAX(id) AS biggest FROM '. $table)->row()->biggest;
155
156
157
return $maxid;
0 commit comments