[eluser]riza_nurhadi[/eluser]
forgot to mention....i'll upload the file when its working smoothly....
[quote author="riza_nurhadi" date="1269315108"][quote author="daniel9201" date="1264653493"]Has anyone successfully installed install BackendPro using a postgres database instead of MySQL?[/quote]
i'm workin on that too...
converting mysql to postgre wont solve anything...
now im trying to change the mysql query to works on postgre..
if anyone have a good news... please bring it up...
ok this is the update...
1. @modules/auth/libraries/
Userlib.php *line 83 *i forgot the line...
changed this
Code:
$query = $this->CI->user_model->delete('Users',
'DATE_ADD(created,INTERVAL '.$this->CI->preference->item('account_activation_time').' DAY) <= NOW()
AND active=0');
into this
Code:
$query = $this->CI->user_model->delete('Users',
'(created+ interval \''.$this->CI->preference->item('account_activation_time').' day\') <= NOW()
AND active=0');
2. @modules/auth/helpers/
khacl_helper.php
changed this
Code:
$rs = $ci->db->query('SELECT access.allow
FROM ('.$ci->db->dbprefix.$tables['aros'].' AS aro_node,
'.$ci->db->dbprefix.$tables['acos'].' AS aco_node)
LEFT JOIN '.$ci->db->dbprefix.$tables['aros'].' AS aro_branch
ON (aro_node.lft >= aro_branch.lft AND aro_node.lft <= aro_branch.rgt)
LEFT JOIN '.$ci->db->dbprefix.$tables['acos'].' AS aco_branch
ON (aco_node.lft >= aco_branch.lft AND aco_node.lft <= aco_branch.rgt)
INNER JOIN '.$ci->db->dbprefix.$tables['access'].' AS access
ON (aro_branch.id = access.aro_id AND aco_branch.id = access.aco_id)
WHERE aro_node.name = ? AND aco_node.name = ?
ORDER BY aro_branch.rgt ASC, aco_branch.rgt ASC
LIMIT 1', array($aro, $aco));
into this
Code:
$rs = $ci->db->query('SELECT access.allow
FROM '.$ci->db->dbprefix.$tables['aros'].' AS aro_node
CROSS JOIN '.$ci->db->dbprefix.$tables['acos'].' AS aco_node
LEFT JOIN '.$ci->db->dbprefix.$tables['aros'].' AS aro_branch
ON (aro_node.lft >= aro_branch.lft AND aro_node.lft <= aro_branch.rgt)
LEFT JOIN '.$ci->db->dbprefix.$tables['acos'].' AS aco_branch
ON (aco_node.lft >= aco_branch.lft AND aco_node.lft <= aco_branch.rgt)
INNER JOIN '.$ci->db->dbprefix.$tables['access'].' AS access
ON (aro_branch.id = access.aro_id AND aco_branch.id = access.aco_id)
WHERE aro_node.name = ? AND aco_node.name = ?
ORDER BY aro_branch.rgt ASC, aco_branch.rgt ASC
LIMIT 1', array($aro, $aco));
3. @modules/auth/helpers/
khacl_helper.php
changed this
Code:
$rs = $ci->db->query('SELECT access_actions.allow
FROM ('.$ci->db->dbprefix.$tables['aros'].' AS aro_node,
'.$ci->db->dbprefix.$tables['acos'].' AS aco_node,
'.$ci->db->dbprefix.$tables['axos'].' AS axo_node)
LEFT JOIN '.$ci->db->dbprefix.$tables['aros'].' AS aro_branch
ON (aro_node.lft >= aro_branch.lft AND aro_node.lft <= aro_branch.rgt)
LEFT JOIN '.$ci->db->dbprefix.$tables['acos'].' AS aco_branch
ON (aco_node.lft >= aco_branch.lft AND aco_node.lft <= aco_branch.rgt)
LEFT JOIN '.$ci->db->dbprefix.$tables['access'].' AS access
ON (aro_branch.id = access.aro_id AND aco_branch.id = access.aco_id)
INNER JOIN '.$ci->db->dbprefix.$tables['access_actions'].' AS access_actions
ON (access.id = access_actions.access_id AND axo_node.id = access_actions.axo_id)
WHERE aro_node.name = ? AND aco_node.name = ? AND axo_node.name = ?
ORDER BY aro_branch.rgt ASC, aco_branch.rgt ASC
LIMIT 1', array($aro, $aco, $axo));
into this
Code:
$rs = $ci->db->query('SELECT access_actions.allow
FROM '.$ci->db->dbprefix.$tables['aros'].' AS aro_node
CROSS JOIN '.$ci->db->dbprefix.$tables['acos'].' AS aco_node
CROSS JOIN '.$ci->db->dbprefix.$tables['axos'].' AS axo_node
LEFT JOIN '.$ci->db->dbprefix.$tables['aros'].' AS aro_branch
ON (aro_node.lft >= aro_branch.lft AND aro_node.lft <= aro_branch.rgt)
LEFT JOIN '.$ci->db->dbprefix.$tables['acos'].' AS aco_branch
ON (aco_node.lft >= aco_branch.lft AND aco_node.lft <= aco_branch.rgt)
LEFT JOIN '.$ci->db->dbprefix.$tables['access'].' AS access
ON (aro_branch.id = access.aro_id AND aco_branch.id = access.aco_id)
INNER JOIN '.$ci->db->dbprefix.$tables['access_actions'].' AS access_actions
ON (access.id = access_actions.access_id AND axo_node.id = access_actions.axo_id)
WHERE aro_node.name = ? AND aco_node.name = ? AND axo_node.name = ?
ORDER BY aro_branch.rgt ASC, aco_branch.rgt ASC
LIMIT 1', array($aro, $aco, $axo));
and maybe theres more to it...[/quote]