Fatal error: Cannot redeclare SharedController::tb_tickets_option_list() in... January 07, 2020, 03:21:31 PM Hi everyone, I am brand new using PHPRAd which I just downloaded yesterday and started playing around with it to see whether is worth it buy the software. Here is my first problem: I have a table (tickets) which picks data from other tables such as TicketStatus, Clients, etc. As I can see, PHPRad allows me to setup lookup data for one field, so when I try to set another field it shows up this error message: Fatal error: Cannot redeclare SharedController::tb_tickets_option_list() in F:\xampp\htdocs\mediabr\app\controllers\SharedController.php on line 48. I checked the SharedController.php file and noticed that PHPRad "duplicated the the function tb_tickets_option_list(). Bellow you can see the code. What am I doing wrong? I need this ticket table to pick data from other tables to fill up some fields./** * tb_tickets_option_list Model Action * @return array */ function tb_tickets_option_list(){ $db = $this->GetModel(); $sqltext = "SELECT DISTINCT id AS value,_ClientName AS label FROM tb_clients ORDER BY _ClientName ASC"; $queryparams = null; $arr = $db->rawQuery($sqltext, $queryparams); return $arr; } /** * tb_tickets_option_list Model Action * @return array */ function tb_tickets_option_list(){ $db = $this->GetModel(); $sqltext = "SELECT DISTINCT Status AS value,Status AS label FROM ticket_status ORDER BY Status ASC"; $queryparams = null; $arr = $db->rawQuery($sqltext, $queryparams); return $arr; } Quote Selected
Re: Fatal error: Cannot redeclare SharedController::tb_tickets_option_list() in... Reply #1 – January 07, 2020, 06:14:50 PM @jufau please share screenshots of the configurations u did that caused the error. Quote Selected
Re: Fatal error: Cannot redeclare SharedController::tb_tickets_option_list() in... Reply #2 – January 15, 2020, 05:22:16 PM Hi, I don't really thing the screenshots will help much but there they go. Apparently the software does not let me create more than one relationship for the same page. The first one works fine. But if i try to create a second one it returns the error mentioned above.I have several fields on my tickets table that are related to other tables such as ticket_status, ticket_type, etc. So instead of showing the status id, I want it to show the status description from the status_description field on the ticket_status table. The same for all other fields/tables. Maybe I am not doing things the right way. Quote Selected
Re: Fatal error: Cannot redeclare SharedController::tb_tickets_option_list() in... Reply #3 – January 18, 2020, 12:26:26 AM @jufau please send me a private message containing your Teamviewer id, so that you can explain to me better on TeamViewer. Quote Selected