Database Helper

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
yaaryvp
User
Posts: 14

Database Helper

Post 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


mobhar
User
Posts: 11905

Post 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.


arbei
User
Posts: 9719

Post by arbei »

You may read Global Functions.


yaaryvp
User
Posts: 14

Post 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


arbei
User
Posts: 9719

Post 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:

You may read Global Functions.


Post Reply