57 $this->Database =
get_package(
'database' ,
'last' , __FILE__ );
58 $this->String =
get_package(
'string' ,
'last' , __FILE__ );
59 $this->Utilities =
get_package(
'utilities' ,
'last' , __FILE__ );
93 $Result = $this->Database->query( $Settings->get_setting(
'query' ) );
94 $Result = $this->Database->fetch_results( $Result );
96 if( isset( $Result[ 0 ] ) )
98 $Result = $Result[ 0 ];
102 throw(
new Exception(
"No data found for the query \"$Query\"" ) );
105 return(
get_field( $Result , $Settings->get_setting(
'field' ) ) );
107 catch( Exception $e )
140 $id = $Settings->get_setting(
'id' );
144 $PackageObject = $this->Utilities->get_package( $Settings , __FILE__ ,
'access_' );
146 if( method_exists( $PackageObject ,
'get_by_id' ) ==
false )
148 $Message =
'The method "get_by_id" was not found in class '.get_class( $PackageObject );
149 throw(
new Exception( $Message ) );
152 $Record = call_user_func( array( $PackageObject ,
'get_by_id' ) , $id );
154 $Field = $Settings->get_setting(
'field' );
160 catch( Exception $e )