Pagani zonda tricolore a php code to export oracle library

WBOY
Release: 2016-07-29 08:39:44
Original
924 people have browsed it

$c color=#ff0000>用户名","密码","(DESCRIPTION=(ADDRESS=(PROTOCOL =TCP)(HOST=IP)(PORT = 1521))(CONNECT_DATA =(SID=lcx)))");
//$sql="select * from all_tab_columns where table_name='MEMBER'";//Table Structure
$sql="select USER_ID,PASSWORD from MEMBER where IDX < 100"; //sql语句

$stmt = OCIParse($conn, $sql);
OCIExecute($stmt);
$rows = OCIFetchstatement($stmt,$results);
$keys = array_keys($results);
$table = "

n n";
foreach($keys as $key)
{
     $table .= " n";
}
$table .= " n";
for($i=0;$i<$rows;$i++)
{
     $table .= " ";
     foreach($results as $spalte)
     {
         $data = $spalte[$i];
         $table .= " ";     
     }
     $table .=" ";
}
echo $table;
$sStr="/home/lcx.htm";
fputs(fopen($sStr,'a+'),$table);
?>
第二种方法:

复制代码 代码如下:


ini_set('max_execution_time', 0);
if(!isset($a) || !isset($b)|| !isset($filename)){exit();}
for($i=$a;$i<$b;$i++)
{
$query = "select IDX,USER_ID,PASSWORD,NAME,SID1,SID2,PHONE,MOBILE,EMAIL,WORKPHONE from member where idx = $i";
$data = sql_fetch($query);
if ($data)
{
for ($ss=0; $ss<=count($data); $ss++)
{
$values .= "

";
}
}
fputs(fopen("$filename","a+"),"
$key
$data
".$data[$ss]."
".$values."
rn");
unset($values);
}
?>


因为不会oracle,也是一行一行照抄来的,
数据库连接也没接触过,就直接用他自带的吧,
没用foreach 循环数组,很奇怪,总是输出2个重复的字段值,没办法就改用for了
qq:57112848 无名

以上就介绍了帕加尼zonda tricolore 一个php导出oracle库的php代码,包括了帕加尼zonda tricolore方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template