Commit 0463c2fa authored by Deddy Vita Kurniawan's avatar Deddy Vita Kurniawan

* revisi menu

parent e0ba928e
......@@ -63,11 +63,12 @@ class Menu_model extends Base_Model {
$oldid = '';
/* hapus dulu menu yang ada */
$this->db->where('a.appid', $this->app_id);
$this->db->delete('menu a');
$this->db->where('appid', $this->app_id);
$this->db->delete('menu');
$cache = array();
/* simpan semua menu */
//die(print_r($this->data));
foreach($this->data as $menu)
{
/* cek dalam cache apakah parent_id perlu di update */
......@@ -94,7 +95,7 @@ class Menu_model extends Base_Model {
/* simpan id kedalam cache */
if ($isnew !== false)
{
$result = $this->db->select('max(id) id')->get('menu')->row_array();
$result = $this->db->select('max(ID) ID')->get('menu')->row_array();
$cache[] = array(
'old' => $oldid,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment