private function meta_row_query($controller, $params) { if (isset($params['id'])) { $tables = $controller . '_meta, ' . $controller . '_lookup'; //set variable value to retrieve all columns $columns = $controller . '_meta.*'; $where = $controller . '_lookup.meta_id=' . $controller . '_meta.meta_id AND ' . $controller . '_lookup.' . $controller . '_id'; $field = array($params['id']); //build single query from BuildQuery class $db_results = BuildQuery::single_field_query($tables, $columns, $where, $field); self::$db_meta_row = $db_results; } }
private function meta_row_query($controller, $format, $params) { if (isset($params['id'])) { $tables = $controller . '_meta, ' . $controller . '_lookup'; //set variable value to retrieve all columns $columns = $controller . '_meta.*'; if (!empty($format)) { $type_id = ContentController::get_content_type($controller, $format); } $where = $controller . '_lookup.meta_id=' . $controller . '_meta.meta_id AND ' . $controller . '_lookup.' . $controller . '_type_id=? AND ' . $controller . '_lookup.' . $controller . '_id=?'; $field = array($type_id, $params['id']); //build single query from BuildQuery class $db_results = BuildQuery::single_lookup_query($tables, $columns, $where, $field); self::$db_meta_row = $db_results; } }