select.pl
来源:互联网 发布:淘宝秧歌服在哪儿买 编辑:程序博客网 时间:2024/06/04 19:04
#! /usr/bin/perl
#
use strict;
use DBI;
use DBI::DBD
open TMP,">>111";
my @row;
my $sql = "";
my $conn = "";
$conn = DBI->connect("DBI:mysql:database=lyytest:host=127.0.0.1","root","123456",{'RaiseError' => 1 });
$sql = $conn->prepare("select * from lyyinfo");
$sql->execute();
#$conn->do($sql);
while(my @row = $sql->fetchrow_array){
#while(@row = $conn->fetchrow()){ //错的
#while(@row = $conn->fetchrow_arr){ //错的
#while(@row = $conn->fetchrow_hashref){ //错的
print TMP "$row[0], $row[1] , $row[2], $row[3], $row[4], $row[5]\n";
# print TMP join(" ## ",@row),"\n";
}
//检查该条语句是否已经存在
my $sel = $conn->prepare("select * from lyyinfo");
$sel->execute();
if(my $ref = $sel->fetchrow_hashref()){
print TMP "the database have this data\n";
}
else{
print TMP "the database not have this data\n";
}
$sel->finish();
close TMP;
$conn->disconnect();
=================================================
- select.pl
- PL/SQL SELECT 查询
- pl/sql select into 用法
- pl/sql developer快速输入select * from
- pl/sql developer快速输入select * from
- pl/sql developer快速输入select * from
- PL/SQL Select into 异常处理
- pl-sql中select * from dual 这个dual是什么
- PL/SQL如何快速打出select * from 记住登陆密码
- PL/SQL如何快速打出select * from 记住登陆密码
- pl sql 工具insert into 中文 后, select为乱码
- pl/sql快速输入select * from等语句
- pl/sql用for in和for select into循环遍历表
- Oracle APEX使用PL/SQL function返回select语句进行动态查询
- pl/sql用for in和for select into循环遍历表
- PL/SQL Developer快速输入select * from等语句快捷键设置
- PL/SQL 自定义快捷键(比如输入s,直接就显示select * from)
- Oracle的PL/SQL块中select * from 查询结果集
- 在Spring3中使用注解(@Scheduled)创建计划任务
- 低成本推广APP的策略
- C#与C++之间类型的对应
- 黑马程序员-7K月薪面试题破解_银行业务调度系统
- ASIHttprequest使用详解
- select.pl
- 舌尖上的职场(五)如何让时间为你高效工作?
- 鲜为人知的谷歌十大惊人事实
- linux内存cached释放
- The method setPositiveButton(int, DialogInterface.OnClickListener) in the type AlertDialog.Builder i
- Android ViewPager+Fragment 仿 Google Play
- relay fetch 解决mysql replication 主从延迟
- Android4.2的多用户管理中关于SD卡的实现改动
- 也谈栈和栈帧(一)