国产成人精品久久免费动漫-国产成人精品天堂-国产成人精品区在线观看-国产成人精品日本-a级毛片无码免费真人-a级毛片毛片免费观看久潮喷

您的位置:首頁/技術(shù)文章
文章詳情頁

PHP調(diào)用三種數(shù)據(jù)庫的方法(3)

瀏覽:2日期:2024-02-28 17:13:21

Oracle(甲骨文)是世界上最為流行的關系數(shù)據(jù)庫。它是大公司推崇的工業(yè)化的強有力的引擎。我們先看看其相關的函數(shù):(1)integer ora_logon(string user , string password)開始對一個Oracle數(shù)據(jù)庫服務器的連接。(2)integer ora_open(integer connection)打開給出的連接的游標。(3)integer ora_do(integer connection, string query)在給出的連接上執(zhí)行查詢。PHP生成一個指示器,解析查詢,并執(zhí)行之。(4)integer ora_parse(integer cursor, string query)解析一個查詢并準備好執(zhí)行。(5)boolean ora_exec(integer cursor)執(zhí)行一個先前由ora_parse函數(shù)解析過的查詢。(6)boolean ora_fetch(integer cursor)此函數(shù)會使得一個執(zhí)行過的查詢中的行被取到指示器中。這使得您可以調(diào)用ora_getcolumn函數(shù)。(7)string ora_getcolumn(integer cursor, integer column)返回當前的值。列由零開始的數(shù)字索引。(8)boolean ora_logoff(integer connection)斷開對數(shù)據(jù)庫服務器的鏈接。以下是向ORACLE數(shù)據(jù)庫插入數(shù)據(jù)的示例程序: <html><head><title>向ORACLE數(shù)據(jù)庫中插入數(shù)據(jù)</title></head><body><form action='<?echo $PHP_SELF;?>' method='post'><table border='1' cellspacing='0' cellpadding='0'><tr><th>ID</th><th>name</th><th>Description</th></tr><tr><td><input type='text' name='name' maxlength='50' size='10'></td><td><input type='text' name='email' maxlength='255' size='30'></td><td><input type='text' name='Description' maxlength='255' size='50'></td></tr><tr align='center'><td colspan='3'><input type='submit' value='提交'>&nbsp;&nbsp;<input type='reset' value='重寫'></td></tr></table></form><?//先設置兩個環(huán)境變量ORACLE_HOME,ORACLE_SIDputenv('ORACLE_HOME=/oracle/app/oracle/product/8.0.4');putenv('ORACLE_SID=ora8');//設置網(wǎng)頁顯示中文putenv('NLS_LANG=Simplified_Chinese.zhs16cgb231280');if($connection=ora_logon('scott','tiger')) {//庫表test有ID,name,Description三項$sql = 'insert into test(ID,name,Description) values '; $sql .= '('' . $ID . '','' . $name . '',''. $Description . '')';if($cursor=ora_do($connect,$sql)) {print('insert finished!');}$query = 'select * from test';if($cursor=ora_do($connect,$query)) {ora_fetch($cursor);$content0=ora_getcolumn($cursor,0);$content1=ora_getcolumn($cursor,1);$content2=ora_getcolumn($cursor,2);print('$content0');print('$content1');print('$content2');ora_close($cursor);}ora_logoff($connection);}?></body></html>

標簽: PHP
主站蜘蛛池模板: 欧美一级高清片欧美国产欧美 | 日韩性大片免费 | 精品国产视频在线观看 | 在线观看免费国产成人软件 | 欧美成人免费夜夜黄啪啪 | 久久国产网 | 最新亚洲人成网站在线影院 | 久久黄网站 | 国产精品在线观看 | 国产一区二区三区在线观看视频 | 欧美一级成人影院免费的 | 亚洲综合精品 | 欧美视频一区二区 | 男女午夜24式免费视频 | 欧美性精品hd在线观看 | 91久久国产口精品久久久久 | 亚洲精品一区二区三区国产 | 国产高清av在线播放 | 亚洲狠狠狠一区二区三区 | 国产在线综合一区二区三区 | 男人好大好硬好爽免费视频 | 亚洲视频天堂 | tom影院亚洲国产日本一区 | 女性无套免费网站在线看 | 99av视频| 中文字幕一区二区三区视频在线 | 亚洲国产精品不卡毛片a在线 | 美女被拍拍拍拍拍拍拍拍 | 亚洲精品综合久久中文字幕 | 国产精品国产亚洲精品看不卡 | 秀人网私拍福利视频在线 | 国产午夜免费不卡精品理论片 | 欧美精品xxxⅹ欧美 欧美精品不卡 | 免费一级欧美毛片 | 亚洲看片网站 | 国产成人a一区二区 | 久草在线观看视频 | 欧美顶级毛片在线播放小说 | 在线观看91精品国产入口 | 亚洲欧美日韩另类精品一区二区三区 | 99精品久久久久久久 |