Skip to content

Commit

Permalink
🔨 bypass dynamic property error
Browse files Browse the repository at this point in the history
Signed-off-by: otengkwame <[email protected]>
  • Loading branch information
otengkwame committed Jun 25, 2023
1 parent 6fe6239 commit 99cfbfb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Core/helpers/db_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function use_table($table = '', $model_type = 'EasyModel')
return $model;
}

$model->table = $table;
$model->{'table'} = $table; // bypass dynamic property error

return $model;
}
Expand Down Expand Up @@ -151,7 +151,7 @@ function max_id($table, $select_as=null) {
if($select_as != null) {
$maxid = ci()->db->query('SELECT MAX(id) AS '.$select_as.' FROM ' . $table)->row()->$select_as;
} else {
$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;
}

return $maxid;
Expand Down

0 comments on commit 99cfbfb

Please sign in to comment.