get TABLE NOT FOUND in production

Permalink
hi.. i'm getting crazy.. a Block works perfect in WAMP but get TABLE NOT FOUND in production (i've attached a screenshot)

Below my code for reproduction, very essential !
Can someone help me please ?
Thank you all in advance
Michele

<?php
namespace Concrete\Package\ReservedFiles\Block\ReservedFiles;
defined("C5_EXECUTE") or die("Access Denied.");
use Concrete\Core\Block\BlockController;
use Core;
use Database;
use Loader;
use Block;
use View;
use Group;
use User;
use UserInfo;
use Page;

class Controller extends BlockController {

protected $btTable = 'btreservedfiles';
protected $btInterfaceWidth = 600;
protected $btInterfaceHeight = 600;
protected $btCacheBlockRecord = true;
protected $btCacheBlockOutput = false;
protected $btCacheBlockOutputOnPost = false;
protected $btCacheBlockOutputForRegisteredUsers = false;
protected $btDefaultSet = 'basic';

public function getBlockTypeDescription(){return t("For handling files ");}
public function getBlockTypeName() {return t("Files");}
public function add() { }
public function edit() {}
public function validate($args) {}
function save($args){}
public function view() {}

//================= the logic ==============================

public function on_start(){
$this->set('records', $this->getAllUserGroup());
}
// --- function to list all user group to be select in ADD/Edit function
public function getAllUserGroup() {
$db = \Database::connection();
$queryAllUserGroup = "SELECT gID, gName FROM groups ";
try { $UserGroupList = $db->fetchAll($queryAllUserGroup); } catch (Exception $e){echo $e->getMessage();}
ksort($UserGroupList); //
return $UserGroupList;
}
}
?>

1 Attachment

 
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
The error is because the database table name is 'Groups' and not as you have it 'groups' (all lowercase)
ConcreteOwl replied on at Permalink Best Answer Reply
ConcreteOwl
skau61 replied on at Permalink Reply
Thank you SO MUCH !!
e good tip saved me tons of thoughts :-)

and another time THANK YOU
Michele from Rome