select.pl

来自「一个俄国人实现的数据库系统」· PL 代码 · 共 24 行

PL
24
字号
#! /usr/bin/perl -w# Example 1# select to binded variables use strict; use Gigabase; my $con=new Gigabase::Connection('localhost',6100,'guest','guest')    || die "$Gigabase::errstr\n"; {  my $statm=$con->create_statement('select * from r') || die $con->errstr;  my ($name,$one,$two,$three);  $statm->bind_column("name",\$name);  $statm->bind_column("one",\$one);  $statm->bind_column("two",\$two);  $statm->bind_column("three",\$three);  my $typles=$statm->fetch();  die $statm->errstr unless defined($typles);  print "num of tuples " , $typles ,"\n";  while ($statm->get_next()) {   print "name=$name one=$one two=$two three=$three\n";  } } #statement automatically freed $con->commit; $con->close();

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?