function open_source($table, $handler = '', $args = 0) { $c = new cursor_sql($table); $c->set_source($table); $this->open_context($c); $this->open_form($this->make_event($handler, $args)); $this->open_table(); $_is_open = true; }
function _get_index(&$app, $parent, $ref_parent, $table, $id) { $id_parent = $app->db->column($table, $ref_parent, $id); $c = new cursor_sql(); $c->set_source($table); $c->query("{$ref_parent}={$id_parent}"); $i = 1; while ($row = $c->get()) { if ($row['id'] == $id) { return array($i, $c->size()); } $i++; } }