htdocs(root)-Myproject/data access/da_admin.php $base = $_SERVER['DOCUMENT_ROOT']; include_once($base.DIRECTORY_SEPARATOR.'status_codes.php'); include_once($base.DIRECTORY_SEPARATOR.'data-access'.DIRECTORY_SEPARATOR.'connection.php'); function db_get_client_master_list($active) { // Base Query $client_squery_base = "select * from client_master"; // Where query $client_squery_where = ""; // Data $client_sdata = array(); $filter_count = 0; if($active != "") { if($filter_count == 0) { // Query $client_squery_where = $client_squery_where." where client_active=:active"; } else { // Query $client_squery_where = $client_squery_where." and client_active=:active"; } // Data $client_sdata[':active'] = $active; $filter_count++; } $client_squery = $client_squery_base.$client_squery_where; try { $dbConnection = get_conn_handle(); $client_sstatement = $dbConnection->prepare($client_squery); $client_sstatement -> execute($client_sdata); $client_sdetails = $client_sstatement -> fetchAll(); if(FALSE === $client_sdetails) { $return["status"] = FAILURE; $return["data"] = ""; } else if(count($client_sdetails) <= 0) { $return["status"] = DB_NO_RECORD; $return["data"] = ""; } else { $return["status"] = DB_RECORD_ALREADY_EXISTS; $return["data"] = $client_sdetails; } } catch(PDOException $e) { // Log the error $return["status"] = FAILURE; $return["data"] = $e->getMessage(); } return $return; } ?> I want to call this function inside Myproject.How can I Do this?Please help me?
include 'PATH/TO/da_admin.php'; db_get_client_master_list('PARAM'); ?>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)