DragonflyCMS Projects > AccountPlus > [fixed] db error - user prefix issue > Community Forums > Phoenix Netology
Forum Index > Community > AccountPlus

[fixed] db error - user prefix issue Reply to topic


after install of accountsplus this db warning :
includes/db/db.php

* CMS Warning line 75: On /Your_Account/prevtheme=default.html While executing query "SELECT user_id, username, group_name, user_active_cp, user_level, COUNT(pid) as pic_count, ROUND(SUM(total_filesize)/1024) as disk_usage, group_quota FROM prefix_users AS u INNER JOIN prefix_cpg_usergroups AS g ON user_group_cp = group_id LEFT JOIN prefix_cpg_albums AS a ON category = 10000 + user_id LEFT JOIN prefix_cpg_pictures AS p ON p.aid = a.aid WHERE username='Dizfunkshunal' GROUP BY 'Dizfunkshunal'" the following error occured: Table 'prefix_users' doesn't exist In: /modules/Your_Account/blocks/quotacpg.php on line: 16


Appears only on My Account tabs Public and My Activity/summary in all themes.

Initiated by Bugger (Original Entry) - Comments Here Please.

Please enter your server specs in your user profile! 😢


Thanks for using Bugger - my bad - neglected to use $user_prefix in /modules/Your_Account/blocks/quotacpg.php Embarassed

<?php if (!defined('CPG_NUKE')) { exit; } global $db, $prefix, $user_prefix, $lang_byte_units; if (is_active('coppermine') && ($username == is_user() || is_admin())) { get_lang('coppermine'); $sql = "SELECT user_id, username, group_name, user_active_cp, user_level, COUNT(pid) as pic_count, ROUND(SUM(total_filesize)/1024) as disk_usage, group_quota FROM {$user_prefix}_users AS u INNER JOIN {$prefix}_cpg_usergroups AS g ON user_group_cp = group_id LEFT JOIN {$prefix}_cpg_albums AS a ON category = 10000 + user_id LEFT JOIN {$prefix}_cpg_pictures AS p ON p.aid = a.aid WHERE username='$username' GROUP BY '$username'"; $qresult = $db->sql_query($sql); $quotas = $db->sql_fetchrow($qresult); if (!$quotas['user_active_cp'] || $quotas['user_level']==0 ) $quotas['group_name'] = '<i>' . INACTIVE . '</i>'; $quotas['disk_usage'] = ($quotas['disk_usage']!='')? $quotas['disk_usage'] : '0'; echo '<br />'; OpenTable(); echo ' <div style="text-align:left;"><b>'.$username.'\'s Coppermine Quota - "'.$quotas['group_name'].'" Group</b></div> <div style="width:150px; float:left;"> <span style="float:left; width:100px;">No. Pictures</span><span style="float:right; text-align:right;">'.$quotas['pic_count'].'</span><br /> <span style="float:left; width:100px;">Disk Useage</span><span style="float:right; text-align:right;">'.$quotas['disk_usage'].' '.$lang_byte_units[1].'</span><br /> <span style="float:left; width:100px;">Disk Quota</span><span style="float:right; text-align:right;">'.$quotas['group_quota'].' '.$lang_byte_units[1].'</span><br/> </div><br style="clear:both;" />'; CloseTable(); }Download also updated.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


I like the bugger lol any chance you release it?

DizWebDesign

Please enter your server specs in your user profile! 😢


Sorry I missed this one Diz.

No plans to release it yet - needs a bit of work before it's suitable for release.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


I like it.

DizWebDesign

Please enter your server specs in your user profile! 😢


So do I LOL 😉

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):

All times are Australia/Adelaide


Jump to: