My project is on Microsoft SQL and in codding I need to connect to mysql manually. So I have use the code as -
Global->All Pages->Page_Loading
global $conn2;
$conn2 = ADONewConnection('mysqlt');
$conn2->port = 3306;
$conn2->Connect($hostname, $username, $password, $database);
And in the table itself I use the following code which work fine -
global $conn2;
$conn2->Execute("");
$conn2->GetOne("");
But when I use this same code in the custom file I got an error as -
Fatal error: Call to a member function Execute() on a non-object in C:\wamp\www\
I have selected the "Include common file" while creating the custom file.
I have also check the generated code of the custom file and I found
<?php include_once $EW_RELATIVE_PATH . "userfn11.php" ?>
m very confuse why my code is not working only on custom file.