/var/www/html/cjfi_r1/vendor/j4mie/idiorm/idiorm.php
protected static function _execute($query, $parameters = array(), $connection_name = self::DEFAULT_CONNECTION) {
$statement = self::get_db($connection_name)->prepare($query);
self::$_last_statement = $statement;
$time = microtime(true);
foreach ($parameters as $key => &$param) {
if (is_null($param)) {
$type = PDO::PARAM_NULL;
} else if (is_bool($param)) {
$type = PDO::PARAM_BOOL;
} else if (is_int($param)) {
$type = PDO::PARAM_INT;
} else {
$type = PDO::PARAM_STR;
}
$statement->bindParam(is_int($key) ? ++$key : $key, $param, $type);
}
$q = $statement->execute();
self::_log_query($query, $parameters, $connection_name, (microtime(true)-$time));
return $q;
}
/**
* Add a query to the internal query log. Only works if the
* 'logging' config option is set to true.
*
* This works by manually binding the parameters to the query - the
* query isn't executed like this (PDO normally passes the query and
* parameters to the database which takes care of the binding) but
* doing it this way makes the logged queries more readable.
* @param string $query
* @param array $parameters An array of parameters to be bound in to the query
* @param string $connection_name Which connection to use
* @param float $query_time Query time
* @return bool
*/
protected static function _log_query($query, $parameters, $connection_name, $query_time) {
Arguments
"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'merek_atena_granit_color5' in 'field list'"
/var/www/html/cjfi_r1/vendor/j4mie/idiorm/idiorm.php
protected static function _execute($query, $parameters = array(), $connection_name = self::DEFAULT_CONNECTION) {
$statement = self::get_db($connection_name)->prepare($query);
self::$_last_statement = $statement;
$time = microtime(true);
foreach ($parameters as $key => &$param) {
if (is_null($param)) {
$type = PDO::PARAM_NULL;
} else if (is_bool($param)) {
$type = PDO::PARAM_BOOL;
} else if (is_int($param)) {
$type = PDO::PARAM_INT;
} else {
$type = PDO::PARAM_STR;
}
$statement->bindParam(is_int($key) ? ++$key : $key, $param, $type);
}
$q = $statement->execute();
self::_log_query($query, $parameters, $connection_name, (microtime(true)-$time));
return $q;
}
/**
* Add a query to the internal query log. Only works if the
* 'logging' config option is set to true.
*
* This works by manually binding the parameters to the query - the
* query isn't executed like this (PDO normally passes the query and
* parameters to the database which takes care of the binding) but
* doing it this way makes the logged queries more readable.
* @param string $query
* @param array $parameters An array of parameters to be bound in to the query
* @param string $connection_name Which connection to use
* @param float $query_time Query time
* @return bool
*/
protected static function _log_query($query, $parameters, $connection_name, $query_time) {
/var/www/html/cjfi_r1/vendor/j4mie/idiorm/idiorm.php
/**
* Execute the SELECT query that has been built up by chaining methods
* on this class. Return an array of rows as associative arrays.
*/
protected function _run() {
$query = $this->_build_select();
$caching_enabled = self::$_config[$this->_connection_name]['caching'];
if ($caching_enabled) {
$cache_key = self::_create_cache_key($query, $this->_values, $this->_table_name, $this->_connection_name);
$cached_result = self::_check_query_cache($cache_key, $this->_table_name, $this->_connection_name);
if ($cached_result !== false) {
$this->_reset_idiorm_state();
return $cached_result;
}
}
self::_execute($query, $this->_values, $this->_connection_name);
$statement = self::get_last_statement();
$rows = array();
while ($row = $statement->fetch(PDO::FETCH_ASSOC)) {
$rows[] = $row;
}
if ($caching_enabled) {
self::_cache_query_result($cache_key, $rows, $this->_table_name, $this->_connection_name);
}
$this->_reset_idiorm_state();
return $rows;
}
/**
* Reset the Idiorm instance state
*/
private function _reset_idiorm_state() {
$this->_values = array();
Arguments
"SELECT `cjfi_merek_atena_granit`.`id`, `merek_atena_granit_text` AS `detail_text`, `merek_atena_granit_desc_en` AS `detail_desc`, `merek_atena_granit_img` AS `list_image`, `merek_atena_granit_color1` AS `color1`, `merek_atena_granit_small1` AS `small1`, `merek_atena_granit_big1` AS `big1`, `merek_atena_granit_color2` AS `color2`, `merek_atena_granit_small2` AS `small2`, `merek_atena_granit_big2` AS `big2`, `merek_atena_granit_color3` AS `color3`, `merek_atena_granit_small3` AS `small3`, `merek_atena_granit_big3` AS `big3`, `merek_atena_granit_color4` AS `color4`, `merek_atena_granit_small4` AS `small4`, `merek_atena_granit_big4` AS `big4`, `merek_atena_granit_color5` AS `color5`, `merek_atena_granit_small5` AS `small5`, `merek_atena_granit_big5` AS `big5`, `merek_atena_granit_color6` AS `color6`, `merek_atena_granit_small6` AS `small6`, `merek_atena_granit_big6` AS `big6`, `merek_atena_granit_color7` AS `color7`, `merek_atena_granit_small7` AS `small7`, `merek_atena_granit_big7` AS `big7`, `type_id`, `rotate`, `ukuran_id`, `cjfi_ukuran`.`ukuran_text`, `cjfi_ukuran`.`ukuran_w`, `cjfi_ukuran`.`ukuran_h`, `cjfi_ukuran`.`ukuran_type`, `motif_id` FROM `cjfi_merek_atena_granit` JOIN `cjfi_ukuran` ON `cjfi_merek_atena_granit`.`ukuran_id` = `cjfi_ukuran`.`id` WHERE `cjfi_merek_atena_granit`.`id` = ?"
array:1 [
0 => & "14"
]
"default"
/var/www/html/cjfi_r1/vendor/j4mie/idiorm/idiorm.php
}
/**
* Tell the ORM that you are expecting multiple results
* from your query, and execute it. Will return a result set object
* containing instances of the ORM class.
* @return \IdiormResultSet
*/
public function find_result_set() {
return new IdiormResultSet($this->_find_many());
}
/**
* Tell the ORM that you are expecting multiple results
* from your query, and execute it. Will return an array,
* or an empty array if no rows were returned.
* @return array
*/
public function find_array() {
return $this->_run();
}
/**
* Tell the ORM that you wish to execute a COUNT query.
* Will return an integer representing the number of
* rows returned.
*/
public function count($column = '*') {
return $this->_call_aggregate_db_function(__FUNCTION__, $column);
}
/**
* Tell the ORM that you wish to execute a MAX query.
* Will return the max value of the choosen column.
*/
public function max($column) {
return $this->_call_aggregate_db_function(__FUNCTION__, $column);
}
/**
/var/www/html/cjfi_r1/my_class/KoleksiMerekDetailModel.php
'color6' =>$merek.'_color6',
'small6' =>$merek.'_small6',
'big6' =>$merek.'_big6',
'color7' =>$merek.'_color7',
'small7' =>$merek.'_small7',
'big7' =>$merek.'_big7',
'type_id',
'rotate',
'ukuran_id',
'cjfi_ukuran.ukuran_text',
'cjfi_ukuran.ukuran_w',
'cjfi_ukuran.ukuran_h',
'cjfi_ukuran.ukuran_type',
'motif_id'
])
->where($this->where_build($param))
->join('cjfi_ukuran',
[$this->table.'.ukuran_id', '=', 'cjfi_ukuran.id']
)
->find_array();
}
protected function where_build(array $val)
{
unset($val['brands']);
if(isset($val['prod_id']))
{
$val[$this->table.'.id'] = $val['prod_id'];
unset($val['prod_id']);
}
return $val;
}
}
/var/www/html/cjfi_r1/koleksi-merek-detail.php
$pagename = "koleksi-merek-detail.php";
$pagetitle = "Koleksi Merek Detail";
/* Variabel */
$prod_id = isset($_GET['prod_id'])?$_GET['prod_id']:null;
$brands = isset($_GET['brands'])?$_GET['brands']:null;
$type = isset($_GET['type'])?$_GET['type']:null;
$size = isset($_GET['size'])?$_GET['size']:null;
$theme = isset($_GET['theme'])?$_GET['theme']:null;
$language = isset($language)?$language:'en';
include "includes/header.php";
// bikin objek query list keramik
$param = HelperClass::get_param(); // ambil base url
$url = HelperClass::get_url(); // ambil parameter nya
// dump($param,$url);
$obj = new KoleksiMerekDetailModel();
$data = $obj->get_list_detail($url,$param)[0];
$view_detail = $obj->view_detail(compact('data'));
?>
<div id="main">
<div id="koleksi" class="row-fluid">
<div class="span3 sidebar">
<?php include "includes/product-sidebar.php"; ?>
</div>
<div class="span9 content">
<?= $view_detail ?>
</div>
</div>
</div>
<?php
include "includes/footer.php";
?>
Arguments
array:3 [
0 => "https://cjfi.co.id/koleksi-merek-detail.php"
1 => "brands=atena_granit&prod_id=14"
2 => "/koleksi-merek-detail.php"
]
array:2 [
"brands" => "atena_granit"
"prod_id" => "14"
]