Hi EveryoneâŚ
I have create the filed name treeapi.php in the root of the suitecrm file folderâŚ
in that i am writing some queries and i need to access dbâŚfor that
i need this configurataion
$db_config = [
âdb_host_nameâ => âlocalhostâ,
âdb_host_instanceâ => âSQLEXPRESSâ,
âdb_user_nameâ => âiugiuiuâ,
âdb_passwordâ => âjvjvyu@00â,
âdb_nameâ => âdemoâ,
âdb_typeâ => âmysqlâ,
];
** $dsn = â{$db_config[âdb_typeâ]}:host={$db_config[âdb_host_nameâ]};dbname={$db_config[âdb_nameâ]}â;
$pdo = new PDO($dsn, $db_config[âdb_user_nameâ], $db_config[âdb_passwordâ]);
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
**
this is and all needed? unncessary right
i am also user globals $db to access this is correct or how to access the db in this mannerâŚ