PIB hack ã®ããã®ãã¿å¸³, etc,,, ããããã¼ã¸ãã¼ã¸ä¸è¦§ã¡ã³ãã¼ç·¨é Debian - PHP/ext/pdo_oci (20100722) æçµæ´æ°ï¼ kou1okada 2010å¹´07æ22æ¥(æ¨) 20:05:18å±¥æ´ Tweet 以ä¸ã¯ä½æ¥è¨é² Debian - PHP/ext/pdo_oci (20100721) ã®ç¶ã 20100722 gdb ã«ããè¦³å¯ ã¨ããããåé¡ã®åºããã¼ãã«ã«ä»¥ä¸ã®ããã« SELECT ãããã³ã¼ãæ¸ãã pdo_oci_test.php<?php $db = new PDO("oci:dbname=//servername/servicename", "user", "password"); $db->beginTransaction(); $sth = $db->prepare("SELECT * FROM tablename")
é£è¼ããã¯ãã³ãã¼ Oracleãã©ãã«å¯¾çã®åºç¤ç¥è 主ãªå 容 Javaãã¼ã¹ã®Webã¢ããªã±ã¼ã·ã§ã³ã«ããããï½ãã®æååã Javaãã¼ã¹ã®Webã¢ããªã±ã¼ã·ã§ã³ã®ã·ã¹ãã æ§æã¨å¤æ表 ãï½ãæååãã®ã¡ã«ããºã JA16SJISTILDEã»JA16EUCTILDEã«ããå¯¾å¦ Vistaãæ°ãã«å¯¾å¿ããJIS X 0213ã¨ã¯ï¼ Oracle Databaseã§JIS X 0213ã«å¯¾å¿ããã«ã¯ JIS X 0213ã¨ã¯ã©ã¤ã¢ã³ãç°å¢ è£å©æåï¼è¿½å æåï¼ã¨ãµãã²ã¼ãã㢠ï¼é¢é£ãã¼ã¯ã¼ãï¼æååããSJIS16TILDEããã«ãæåããµãã²ã¼ããã¢ãè£å©æåï¼è¿½å æåï¼ WindowsãJavaãªã©ã®ããã«ãOSãããã°ã©ãã³ã°è¨èªã®å é¨å¦çã§ã¯ãæåãã¼ã¿ãUnicodeã§æ±ããã¨ãä¸è¬çã«ãªã£ã¦ãã¦ãã¾ããUnicodeã®ç®çã®1ã¤ã¯ãåä¸ã®ããã°ã©ã ã§è¤æ°è¨èªã«å¯¾å¿ãããã¨ã§
å¤é¨è¡¨ (External Table) å¤é¨ãã¡ã¤ã«ã«å¯¾ãã¦ããããããã¼ãã«ãåå¨ãããã®ããã«ã¢ã¯ã»ã¹ãããã¨ãã§ãããããã¥ã¢ã«ä¸ã§ã¯ãSQL*Loader æ©è½ãè£è¶³ããæ©è½ã¨ä½ç½®ä»ãã«ãªã£ã¦ããã ä¾ãã° CSV ãã¡ã¤ã«ã®å®ç¾©ã CREATE TABLE ã§å®£è¨ããã ãã§ãã¼ãã£ã³ã°æéã¼ãã§å³åº§ã«èªã¿è¾¼ãï¼ã¢ã¯ã»ã¹ããï¼ãã¨ãã§ããã SQL*Loader ã¨å¤§ããç°ãªãç¹ã¯ãã¼ãã«ã¨ãã¦ã®å®ä½ãæããªãç¹ã§ããã(é·æã§ãããçæã§ããã) SQL*Loader ã¯ãã¼ã¿ããã¡ãã£ã¢ãã¡ã¤ã«ããæ°¸ç¶ãã¼ãã«ã«åãè¾¼ãããããªã¢ã©ã¤ãºãã»ãã¥ã¼ å¤é¨è¡¨(External Table) ã¯ãã¡ã¤ã«ã®ãã¼ã¿ããã¼ãã«ãåå¨ããããã«è¦ãã ãã¥ã¼ ã¨èããã¨ããã®éããã¤ã¡ã¼ã¸ããããã å¤é¨è¡¨ã¯ãã¼ã¿ãã¡ã¤ã«ãå¤æ´ããã¨ãã¼ãã«ã®æ¤ç´¢çµæã«ããã«åæ ãããã*1 ãã¡ã¤ã«ã表
æ´æ°ï¼æ¿å ¥ï¼åé¤ã®SQLãé«éåãã3ã¤ã®æã¨ã¯ï¼ï¼Oracle SQLãã¥ã¼ãã³ã°è¬åº§ï¼12ï¼ï¼1/3 ãã¼ã¸ï¼ æ¬é£è¼ã§ã¯ãOracleãã¼ã¿ãã¼ã¹ã®ããã©ã¼ãã³ã¹ã»ãã¥ã¼ãã³ã°ã®ä¸ãããç¹ã«SQLã®ãã¥ã¼ãã³ã°ã«æ³¨ç®ãã¦ãå®è·µã¬ãã«ã®ææ³ã解説ãããèªè ã¯Oracleãã¼ã¿ãã¼ã¹ã®ã¢ã¼ããã¯ãã£ãç解ããéç¨ç®¡çã®å®åçµé¨ãç©ãã§ãããã¨ãæã¾ããã対象ã¨ãããã¼ã¸ã§ã³ã¯ç¾ç¶ã§åºã使ããã¦ããOracle9iã®æ©è½ãåºæ¬ã¨ããããOracle 10gã§æå¹ãªæ å ±ãéæç´¹ä»ãã¦ãããï¼ç·¨éå±ï¼ é£è¼ç®æ¬¡ ååã¯ãçµè¾¼ã¿æ¡ä»¶ï¼WHEREæ¡ä»¶ï¼ã®æç¡ã«ããçµåå¦çãããããªã¢ã©ã¤ãºãã»ãã¥ã¼ãªã©Oracleã®æ©è½ãå©ç¨ããçµåå¦çã®ãã¥ã¼ãã³ã°ææ³ã説æãã¾ãããä»åã¯ãWHEREæ¡ä»¶ããªãDMLï¼INSERTãDELETEãUPDATEï¼å¦çãé«éåãããã¥ã¼ãã³ã°ææ³ã«ã¤ãã¦èª¬æãã¾ã
ã¿ã¤ãã«é·ããWindowsã®Firefoxã§å¤é¨ã¨ãã£ã¿ãè¨å®ããã¨ã¾ãééããªãã¯ã¾ããã°ãã©ãã«ãåé¿ãã¦ãããã¨ãã試ã¿ããã®ãã°ã¯å¯¾è±¡ã®ãã¼ã¸ã®ã½ã¼ã¹ãä¸æçãªãã¡ã¤ã«ã«ä¿åã¾ã§ã¯æ£å¸¸ã«è¡ãã¦ãããã®ã®ãæå®ããå¤é¨ã¨ãã£ã¿ã«ãã®ãã¡ã¤ã«åãUTF-8(å¤å)ã§æ¸¡ãããã®ãåå ãç´æ¥view_source.editor.pathã«å¤é¨ã¨ãã£ã¿ãæå®ããã«ãã´ãã§ã´ãã§ãããããã»ãã¡ã¤ã«ãæå®ãã¦ããã¨ããææ³ã§é å¼µã£ã¦ã¿ããçµæãã§ããªããã¨ãªã©ãªãã¨ãããã¨ãããã£ããããããã¡ã¤ã«ããã¼ã @echo off pushd %TEMP% for /f "delims=" %%i in ('dir /b /od') do set x=%%i "C:\WINDOWS\notepad.exe" "%x%" exit 以ä¸ã®ãããã»ã¹ã¯ãªãããview-source-editor.b
ã·ã§ã«ã¹ã¯ãªããã§ç¹°ãè¿ãå¦çãè¡ãã¨ãå¿ è¦ã«ãªããã¨ãå¤ãããã°ã°ãããã«ãããã¦ã¿ã¦ãæ¡å¤ããã«è¦ã¤ãããªãã®ã§è¨é²ãã¦ãããã®ã§ããã1ãã100ã¾ã§1ãã¤å¢å ãããªããç¹°ãè¿ãå ´åã¯ãããªæãã for i in `seq 1 1 100` do // do something done ã¯ã³ã©ã¤ãã¼ã§æ¸ããªããããªãã $ for i in `seq 1 1 100`; do // do something; done 1 2 (snip) 99 100 2ãã¤å¢å ããããªã`seq 1 2 100`ã«ããã°è¯ãã ãªãwhileæã§ãåæ§ã®ãã¨ã¯ã§ãããé·ããªããè¤éã§åããã«ããã i=1 while [ $i -le 100 ]; do // do something i=`expr $i + 1` done ã¯ã³ã©ã¤ãã¼ã ã¨è¦ãç®ã®è¤éããããã«å¢ãã $ i=1; w
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}