Hi
I'm trying to create a custom view with a param.
I've followed suggestions in https://phprad.com/forum/index.php?topic=175.0 by WIllVin
But I still get error 500.
(due to an error in the forum "The upload directory is full. Please contact an administrator about this problem." I cannot post an image)
I've create a simple customView using PHPRad QueryBuilder
SELECT c.idcompany, c.name, c.isExternal, c.descr FROM companies AS c WHERE (c.idcompany = ? )
and set the sngle param to 1 entering 1
to the first line in the Edit Query Params box
Then
- Added the custom view to a menu,
- Saved project and
- published
navigating to the custom view I get ERROR 500
Navigating to the project APP / CONTROLLER directory using Poect Explorer and opening the controller of the created custom viewI can find these two lines
$sqltext = "SELECT SQL_CALC_FOUND_ROWS c.idcompany, c.name, c.isExternal, c.descr FROM companies AS c WHERE (c.idcompany = ? )";
$queryparams = null;
I expected to find
$sqltext = "SELECT SQL_CALC_FOUND_ROWS c.idcompany, c.name, c.isExternal, c.descr FROM companies AS c WHERE (c.idcompany = ? )";
$queryparams = $db->rawQueryValue($sqltext, array(1));
Yet even modifying the line manually I still get ERROR 500.
I consider it a bug.
How can I fix it?
Best Regards