Page 1 of 1
Database Helper
Posted: Tue Jul 23, 2024 12:39 am
by yaaryvp
Hello,
I have used:
$db =& DbHelper();
to render data in a custom page
namespace PHPMaker2023\hamoked_office_helper;
$db =& DbHelper();
$sql = "SELECT * from FaxListManage WHERE faxID = $faxID;";
$result = $db->ExecuteRow($sql);
but after clean generation I get the following error:
Call to undefined function PHPMaker2023\hamoked_office_helper\DbHelper()
Wondering what has happened and why
Re: $db =& DbHelper(); stopped working and returns error
Posted: Tue Jul 23, 2024 1:04 am
by mobhar
You may read about Deprecated and Removed in the latest version of PHPMaker.
Quoted from it:
The DbHelper class has been removed. You should use the Conn() function directly to get a connection object instead.
Re: Using DbHelper()
Posted: Tue Jul 23, 2024 8:06 am
by arbei
Re: Using DbHelper()
Posted: Mon Jul 29, 2024 6:01 pm
by yaaryvp
I am trying to use $conn = Conn('$dbname')
e.g.
$conn = Conn('booksy.xio.co.il');
and is getting the following error:
/var/www/booksy.xio.co.il/public_html/src/phpfn.php(54): Undefined index: Databases.booksy.xio.co.il in configuration.
is there something I am missing?
Thank you for your help
Re: Using DbHelper()
Posted: Mon Jul 29, 2024 6:31 pm
by arbei
The argument is the database name in your project, read Database, Table, Field Variable Names.
If you just want to do ExecuteRow()
, you can call the global function directly.
arbei wrote: