{"id":42,"date":"2012-12-12T18:54:56","date_gmt":"2012-12-12T10:54:56","guid":{"rendered":"http:\/\/140.112.31.82\/wordpress\/?p=42"},"modified":"2012-12-12T18:54:56","modified_gmt":"2012-12-12T10:54:56","slug":"%e7%ac%ac%e5%9b%9b%e5%a0%82-php-sqlite-%e7%af%84%e4%be%8b","status":"publish","type":"post","link":"https:\/\/cflin.com\/wordpress\/42\/%e7%ac%ac%e5%9b%9b%e5%a0%82-php-sqlite-%e7%af%84%e4%be%8b","title":{"rendered":"[\u7b2c\u56db\u5802] php &amp; sqlite \u7bc4\u4f8b"},"content":{"rendered":"<p>&lt;form action=\"\" method=\"post\" name=\"form1&#8243;&gt;&lt;br&gt;<br \/>\nInput address book data:&lt;br&gt;<br \/>\n&lt;input name=\"name\" type=\"text\" value=\"shinder\"&gt;&lt;br&gt;<br \/>\n&lt;input name=\"phone\" type=\"text\" value=\"0918981520&#8243;&gt;&lt;br&gt;<br \/>\n&lt;input name=\"address\" type=\"text\" value=\"Taipei\"&gt;&lt;br&gt;<br \/>\n&lt;input name=\"submit\" type=\"submit\" value=\"Add\"&gt;&lt;br&gt;<\/p>\n<p>&lt;?php<\/p>\n<p>\/\/\u5efa\u7acb\u8cc7\u6599\u9023\u7dda\u7269\u4ef6<br \/>\n$pdo = new PDO(&#8220;sqlite:mydb.sqlite\");<\/p>\n<p>$pdo-&gt;exec(&#8220;CREATE TABLE address_book (<br \/>\nsid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL ,<br \/>\nname VARCHAR,<br \/>\nphone VARCHAR,<br \/>\naddress VARCHAR,<br \/>\ncreation_date DATETIME DEFAULT CURRENT_TIMESTAMP)\");<br \/>\nif(count($_POST)&gt;0) {<br \/>\n\/\/ \u6e96\u5099\u65b0\u589e\u8cc7\u6599\u7684\u8a9e\u6cd5<br \/>\n$name = $_POST[&#8220;name\"];<br \/>\n$phone = $_POST[&#8220;phone\"];<br \/>\n$address = $_POST[&#8220;address\"];<br \/>\n$pdo-&gt;exec(&#8220;INSERT INTO &#8216;address_book&#8217; (&#8216;name&#8217;, &#8216;phone&#8217;, &#8216;address&#8217; )<br \/>\nVALUES( &#8216;$name&#8217;, &#8216;$phone&#8217;, &#8216;$address&#8217;)\");<br \/>\n}<\/p>\n<p>$pdoStatement = $pdo-&gt;prepare(&#8220;SELECT * FROM address_book\");<br \/>\n$pdoStatement-&gt;execute();<br \/>\n$arr;<br \/>\nwhile($row = $pdoStatement-&gt;fetch(PDO::FETCH_ASSOC) ) {<br \/>\nprint_r( $row );<br \/>\n}<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&lt;form action=\"\" method=\"post\" name=\"form1&#8243;&gt;&lt;br&gt; Input address book data:&lt;br&gt; &lt;input name=\"name\" type=\"text\" value=\"shinder\"&gt;&lt;br&gt; &lt;input name=\"phone\" type=\"text\" value=\"0918981520&#8243;&gt;&lt;br&gt; &lt;input name=\"address\" type=\"text\" value=\"Taipei\"&gt;&lt;br&gt; &lt;input name=\"submit\" type=\"submit\" value=\"Add\"&gt;&lt;br&gt; &lt;?php \/\/\u5efa\u7acb\u8cc7\u6599\u9023\u7dda\u7269\u4ef6 $pdo = new PDO(&#8220;sqlite:mydb.sqlite\"); $pdo-&gt;exec(&#8220;CREATE TABLE address_book ( sid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL , name VARCHAR, phone VARCHAR, address VARCHAR, creation_date DATETIME DEFAULT CURRENT_TIMESTAMP)\"); if(count($_POST)&gt;0) { \/\/ &hellip; <a href=\"https:\/\/cflin.com\/wordpress\/42\/%e7%ac%ac%e5%9b%9b%e5%a0%82-php-sqlite-%e7%af%84%e4%be%8b\" class=\"more-link\">\u95b1\u8b80\u5168\u6587 <span class=\"screen-reader-text\">[\u7b2c\u56db\u5802] php &amp; sqlite \u7bc4\u4f8b<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false},"categories":[4],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>[\u7b2c\u56db\u5802] php &amp; sqlite \u7bc4\u4f8b - \u53f0\u5927\u7cfb\u7d71\u8a13\u7df4\u73ed\u8ab2\u7a0b\u7db2\u9801 (\u6797\u5947\u8ce6)<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cflin.com\/wordpress\/42\/\u7b2c\u56db\u5802-php-sqlite-\u7bc4\u4f8b\" \/>\n<meta property=\"og:locale\" content=\"zh_TW\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[\u7b2c\u56db\u5802] php &amp; sqlite \u7bc4\u4f8b - \u53f0\u5927\u7cfb\u7d71\u8a13\u7df4\u73ed\u8ab2\u7a0b\u7db2\u9801 (\u6797\u5947\u8ce6)\" \/>\n<meta property=\"og:description\" content=\"&lt;form action=&quot;&quot; method=&quot;post&quot; name=&quot;form1&#8243;&gt;&lt;br&gt; Input address book data:&lt;br&gt; &lt;input name=&quot;name&quot; type=&quot;text&quot; value=&quot;shinder&quot;&gt;&lt;br&gt; &lt;input name=&quot;phone&quot; type=&quot;text&quot; value=&quot;0918981520&#8243;&gt;&lt;br&gt; &lt;input name=&quot;address&quot; type=&quot;text&quot; value=&quot;Taipei&quot;&gt;&lt;br&gt; &lt;input name=&quot;submit&quot; type=&quot;submit&quot; value=&quot;Add&quot;&gt;&lt;br&gt; &lt;?php \/\/\u5efa\u7acb\u8cc7\u6599\u9023\u7dda\u7269\u4ef6 $pdo = new PDO(&#8220;sqlite:mydb.sqlite&quot;); $pdo-&gt;exec(&#8220;CREATE TABLE address_book ( sid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL , name VARCHAR, phone VARCHAR, address VARCHAR, creation_date DATETIME DEFAULT CURRENT_TIMESTAMP)&quot;); if(count($_POST)&gt;0) { \/\/ &hellip; \u95b1\u8b80\u5168\u6587 [\u7b2c\u56db\u5802] php &amp; sqlite \u7bc4\u4f8b &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cflin.com\/wordpress\/42\/\u7b2c\u56db\u5802-php-sqlite-\u7bc4\u4f8b\" \/>\n<meta property=\"og:site_name\" content=\"\u53f0\u5927\u7cfb\u7d71\u8a13\u7df4\u73ed\u8ab2\u7a0b\u7db2\u9801 (\u6797\u5947\u8ce6)\" \/>\n<meta property=\"article:published_time\" content=\"2012-12-12T10:54:56+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Chifu\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cflin.com\/wordpress\/#website\",\"url\":\"https:\/\/cflin.com\/wordpress\/\",\"name\":\"\u53f0\u5927\u7cfb\u7d71\u8a13\u7df4\u73ed\u8ab2\u7a0b\u7db2\u9801 (\u6797\u5947\u8ce6)\",\"description\":\"\u53f0\u5927\u7cfb\u7d71\u8a13\u7df4\u73ed python \u8ab2\u7a0b\u76f8\u95dc\u8cc7\u6599\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cflin.com\/wordpress\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-TW\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cflin.com\/wordpress\/42\/%e7%ac%ac%e5%9b%9b%e5%a0%82-php-sqlite-%e7%af%84%e4%be%8b#webpage\",\"url\":\"https:\/\/cflin.com\/wordpress\/42\/%e7%ac%ac%e5%9b%9b%e5%a0%82-php-sqlite-%e7%af%84%e4%be%8b\",\"name\":\"[\u7b2c\u56db\u5802] php &amp; sqlite \u7bc4\u4f8b - \u53f0\u5927\u7cfb\u7d71\u8a13\u7df4\u73ed\u8ab2\u7a0b\u7db2\u9801 (\u6797\u5947\u8ce6)\",\"isPartOf\":{\"@id\":\"https:\/\/cflin.com\/wordpress\/#website\"},\"datePublished\":\"2012-12-12T10:54:56+00:00\",\"dateModified\":\"2012-12-12T10:54:56+00:00\",\"author\":{\"@id\":\"https:\/\/cflin.com\/wordpress\/#\/schema\/person\/fcc9937e50465bfaa039229ad12d89aa\"},\"breadcrumb\":{\"@id\":\"https:\/\/cflin.com\/wordpress\/42\/%e7%ac%ac%e5%9b%9b%e5%a0%82-php-sqlite-%e7%af%84%e4%be%8b#breadcrumb\"},\"inLanguage\":\"zh-TW\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cflin.com\/wordpress\/42\/%e7%ac%ac%e5%9b%9b%e5%a0%82-php-sqlite-%e7%af%84%e4%be%8b\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cflin.com\/wordpress\/42\/%e7%ac%ac%e5%9b%9b%e5%a0%82-php-sqlite-%e7%af%84%e4%be%8b#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9801\",\"item\":\"https:\/\/cflin.com\/wordpress\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[\u7b2c\u56db\u5802] php &amp; sqlite \u7bc4\u4f8b\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/cflin.com\/wordpress\/#\/schema\/person\/fcc9937e50465bfaa039229ad12d89aa\",\"name\":\"Chifu\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-TW\",\"@id\":\"https:\/\/cflin.com\/wordpress\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/83c3d40c89fb05d334f2a3eddcfb4ac7?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/83c3d40c89fb05d334f2a3eddcfb4ac7?s=96&d=mm&r=g\",\"caption\":\"Chifu\"},\"sameAs\":[\"http:\/\/cflin.com\"],\"url\":\"https:\/\/cflin.com\/wordpress\/author\/daky\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[\u7b2c\u56db\u5802] php &amp; sqlite \u7bc4\u4f8b - \u53f0\u5927\u7cfb\u7d71\u8a13\u7df4\u73ed\u8ab2\u7a0b\u7db2\u9801 (\u6797\u5947\u8ce6)","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cflin.com\/wordpress\/42\/\u7b2c\u56db\u5802-php-sqlite-\u7bc4\u4f8b","og_locale":"zh_TW","og_type":"article","og_title":"[\u7b2c\u56db\u5802] php &amp; sqlite \u7bc4\u4f8b - \u53f0\u5927\u7cfb\u7d71\u8a13\u7df4\u73ed\u8ab2\u7a0b\u7db2\u9801 (\u6797\u5947\u8ce6)","og_description":"&lt;form action=\"\" method=\"post\" name=\"form1&#8243;&gt;&lt;br&gt; Input address book data:&lt;br&gt; &lt;input name=\"name\" type=\"text\" value=\"shinder\"&gt;&lt;br&gt; &lt;input name=\"phone\" type=\"text\" value=\"0918981520&#8243;&gt;&lt;br&gt; &lt;input name=\"address\" type=\"text\" value=\"Taipei\"&gt;&lt;br&gt; &lt;input name=\"submit\" type=\"submit\" value=\"Add\"&gt;&lt;br&gt; &lt;?php \/\/\u5efa\u7acb\u8cc7\u6599\u9023\u7dda\u7269\u4ef6 $pdo = new PDO(&#8220;sqlite:mydb.sqlite\"); $pdo-&gt;exec(&#8220;CREATE TABLE address_book ( sid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL , name VARCHAR, phone VARCHAR, address VARCHAR, creation_date DATETIME DEFAULT CURRENT_TIMESTAMP)\"); if(count($_POST)&gt;0) { \/\/ &hellip; \u95b1\u8b80\u5168\u6587 [\u7b2c\u56db\u5802] php &amp; sqlite \u7bc4\u4f8b &rarr;","og_url":"https:\/\/cflin.com\/wordpress\/42\/\u7b2c\u56db\u5802-php-sqlite-\u7bc4\u4f8b","og_site_name":"\u53f0\u5927\u7cfb\u7d71\u8a13\u7df4\u73ed\u8ab2\u7a0b\u7db2\u9801 (\u6797\u5947\u8ce6)","article_published_time":"2012-12-12T10:54:56+00:00","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Chifu","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/cflin.com\/wordpress\/#website","url":"https:\/\/cflin.com\/wordpress\/","name":"\u53f0\u5927\u7cfb\u7d71\u8a13\u7df4\u73ed\u8ab2\u7a0b\u7db2\u9801 (\u6797\u5947\u8ce6)","description":"\u53f0\u5927\u7cfb\u7d71\u8a13\u7df4\u73ed python \u8ab2\u7a0b\u76f8\u95dc\u8cc7\u6599","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cflin.com\/wordpress\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-TW"},{"@type":"WebPage","@id":"https:\/\/cflin.com\/wordpress\/42\/%e7%ac%ac%e5%9b%9b%e5%a0%82-php-sqlite-%e7%af%84%e4%be%8b#webpage","url":"https:\/\/cflin.com\/wordpress\/42\/%e7%ac%ac%e5%9b%9b%e5%a0%82-php-sqlite-%e7%af%84%e4%be%8b","name":"[\u7b2c\u56db\u5802] php &amp; sqlite \u7bc4\u4f8b - \u53f0\u5927\u7cfb\u7d71\u8a13\u7df4\u73ed\u8ab2\u7a0b\u7db2\u9801 (\u6797\u5947\u8ce6)","isPartOf":{"@id":"https:\/\/cflin.com\/wordpress\/#website"},"datePublished":"2012-12-12T10:54:56+00:00","dateModified":"2012-12-12T10:54:56+00:00","author":{"@id":"https:\/\/cflin.com\/wordpress\/#\/schema\/person\/fcc9937e50465bfaa039229ad12d89aa"},"breadcrumb":{"@id":"https:\/\/cflin.com\/wordpress\/42\/%e7%ac%ac%e5%9b%9b%e5%a0%82-php-sqlite-%e7%af%84%e4%be%8b#breadcrumb"},"inLanguage":"zh-TW","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cflin.com\/wordpress\/42\/%e7%ac%ac%e5%9b%9b%e5%a0%82-php-sqlite-%e7%af%84%e4%be%8b"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/cflin.com\/wordpress\/42\/%e7%ac%ac%e5%9b%9b%e5%a0%82-php-sqlite-%e7%af%84%e4%be%8b#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9801","item":"https:\/\/cflin.com\/wordpress"},{"@type":"ListItem","position":2,"name":"[\u7b2c\u56db\u5802] php &amp; sqlite \u7bc4\u4f8b"}]},{"@type":"Person","@id":"https:\/\/cflin.com\/wordpress\/#\/schema\/person\/fcc9937e50465bfaa039229ad12d89aa","name":"Chifu","image":{"@type":"ImageObject","inLanguage":"zh-TW","@id":"https:\/\/cflin.com\/wordpress\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/83c3d40c89fb05d334f2a3eddcfb4ac7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/83c3d40c89fb05d334f2a3eddcfb4ac7?s=96&d=mm&r=g","caption":"Chifu"},"sameAs":["http:\/\/cflin.com"],"url":"https:\/\/cflin.com\/wordpress\/author\/daky"}]}},"_links":{"self":[{"href":"https:\/\/cflin.com\/wordpress\/wp-json\/wp\/v2\/posts\/42"}],"collection":[{"href":"https:\/\/cflin.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cflin.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cflin.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cflin.com\/wordpress\/wp-json\/wp\/v2\/comments?post=42"}],"version-history":[{"count":0,"href":"https:\/\/cflin.com\/wordpress\/wp-json\/wp\/v2\/posts\/42\/revisions"}],"wp:attachment":[{"href":"https:\/\/cflin.com\/wordpress\/wp-json\/wp\/v2\/media?parent=42"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cflin.com\/wordpress\/wp-json\/wp\/v2\/categories?post=42"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cflin.com\/wordpress\/wp-json\/wp\/v2\/tags?post=42"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}