{"id":1026,"date":"2009-04-22T12:49:21","date_gmt":"2009-04-22T03:49:21","guid":{"rendered":"http:\/\/doodlenote.net\/?p=1026"},"modified":"2009-04-22T12:49:21","modified_gmt":"2009-04-22T03:49:21","slug":"mysql%e3%81%aetimestamp%e5%9e%8b%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e6%9b%b4%e6%96%b0%e6%97%a5%e6%99%82%e3%81%a8%e7%94%9f%e6%88%90%e6%97%a5%e6%99%82%e3%81%ae%e4%b8%a1%e6%96%b9%e3%82%92%e8%a8%98","status":"publish","type":"post","link":"https:\/\/doodlenote.net\/?p=1026","title":{"rendered":"mysql\u306etimestamp\u578b\u3092\u4f7f\u3063\u3066\u66f4\u65b0\u65e5\u6642\u3068\u751f\u6210\u65e5\u6642\u306e\u4e21\u65b9\u3092\u8a18\u9332\u3059\u308b"},"content":{"rendered":"<p>\u3044\u3044\u4e8b\u66f8\u3044\u3066\u3042\u308b\u3002\u3081\u3082<\/p>\n<p>CREATE TABLE `test` (<br \/>\n  id int(4) unsigned NOT NULL auto_increment,<br \/>\n  name varchar(10) ,<br \/>\n      .<br \/>\n      .<br \/>\n      \u7565<br \/>\n      .<br \/>\n      .<br \/>\n  modified_date timestamp NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,<br \/>\n  create_date timestamp NOT NULL default &#8216;0000-00-00 00:00:00&#8217;,<br \/>\n  PRIMARY KEY  (id)<br \/>\n);<br \/>\n[\u53c2\u8003]<br \/>\nhttp:\/\/isoldeblog.blog93.fc2.com\/blog-entry-14.html<\/p>\n<p>\n\u30ad\u30e2\u306f<\/p>\n<p>    create_date timestamp NOT NULL default &#8216;0000-00-00 00:00:00&#8217;<\/p>\n<p>\u3053\u306e\u66f8\u304d\u65b9\u3002\u5c5e\u6027\u306fNOT NULL\u306b\u3057\u306a\u3044\u3068\u3046\u307e\u304f\u3044\u304b\u306a\u3044\u3063\u307d\u3044\u3002<\/p>\n<p>\u3042\u3068\u3001\u3053\u306e\u5834\u5408CURRENT_TIMESTAMP\u3092create_date\u306e\u30ab\u30e9\u30e0\u3067\u66f8\u3053\u3046\u3068\u3057\u3066\u3082\u30c6\u30fc\u30d6\u30eb\u5185\u306b2\u3064\u4ee5\u4e0aCURRENT_TIMESTAMP\u304c\u3042\u308b\u5834\u5408\u306f\u30a8\u30e9\u30fc\u306b\u306a\u3063\u3066CREATE TABLE\u304c\u51fa\u6765\u306a\u3044\u306e\u3067\u6ce8\u610f\u3002<\/p>\n<p>\n\u3067\u3001\u6b21\u306bINSERT\u306e\u65b9\u6cd5\u3002<\/p>\n<p>    INSERT INTO test ( name , create_date ) VALUES ( &#8216;foo&#8217; , NULL ); <\/p>\n<p>\u306e\u3088\u3046\u306bINSERT\u6642\u306b\u308f\u3056\u3068NULL\u3092\u30bb\u30c3\u30c8\u3059\u308b\u4e8b\u3067\u73fe\u5728\u65e5\u6642\u304c\u30bb\u30c3\u30c8\u3055\u308c\u308b\u3053\u3068\u306b\u306a\u308b\u3002\uff08\u3061\u306a\u307f\u306bmodified_date\u306f\u4f55\u3082\u3057\u306a\u304f\u3066\u3082 DEFAULT \u304c CURRENT_TIMESTAMP \u3068\u660e\u793a\u3057\u3066\u3042\u308b\u306e\u3067\u305d\u306e\u3088\u3046\u306b\u632f\u821e\u3063\u3066\u304f\u308c\u307e\u3059\uff3e\uff3e\uff09<\/p>\n<p>\u3067\u3001\u672c\u5f53\u306a\u3089\u8a71\u306f\u3053\u3053\u3067\u7d42\u308f\u308b\u3093\u3060\u3051\u3069\u3001\u30a2\u30bf\u30b7\u306e\u5834\u5408\u306fPEAR::DB\u306eautoExecute\u306a\u3069\u3092\u3088\u304f\u4f7f\u3063\u3066\u3044\u308b\u306e\u3067\u305d\u306e\u6642\u306b\u3001\u306f\u305f\u3068\u56f0\u3063\u305f\u3002<\/p>\n<p>autoExecute\u306e\u633f\u5165\u5024\u306e\u914d\u5217\u306f\u57fa\u672c\u7684\u306b\u30ea\u30c6\u30e9\u30eb\u3067\u3042\u308b\u5fc5\u8981\u304c\u3042\u308b\u306f\u305a\u3002NULL\u3063\u3066\u3069\u3046\u3084\u3063\u3066\u6e21\u3059\u306e\uff1f\uff1f<\/p>\n<p>\u3042\u308c\u3053\u308c\u8a66\u3057\u305f\u7d50\u679c<\/p>\n<p>    $con = new DB;<br \/>\n    $db = $con->connect(_DSN);<br \/>\n    $DATA=array( &#8216;name&#8217; => &#8216;foo&#8217; , &#8216;create_date&#8217; => null );<br \/>\n    $result = $db->autoExecute(&#8220;test&#8221;, $DATA, DB_AUTOQUERY_INSERT);<\/p>\n<p>\u898b\u305f\u3044\u306a\u66f8\u304d\u65b9\u3067\u3044\u3044\u3053\u3068\u304c\u5224\u660e\u3002<br \/>\n\u306a\u3041\u301c\u3093\u3060\u3002php\u306e\u5b9a\u6570\u306eNULL\u3067\u3044\u3044\u3093\u3060<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3044\u3044\u4e8b\u66f8\u3044\u3066\u3042\u308b\u3002\u3081\u3082 CREATE TABLE `test` ( id int(4) unsigned NOT NULL auto_increment, name varchar(10) , . .&hellip;<a href=\"https:\/\/doodlenote.net\/?p=1026\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">mysql\u306etimestamp\u578b\u3092\u4f7f\u3063\u3066\u66f4\u65b0\u65e5\u6642\u3068\u751f\u6210\u65e5\u6642\u306e\u4e21\u65b9\u3092\u8a18\u9332\u3059\u308b<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[3],"class_list":["post-1026","post","type-post","status-publish","format-standard","hentry","category-program","tag-oldblog"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>mysql\u306etimestamp\u578b\u3092\u4f7f\u3063\u3066\u66f4\u65b0\u65e5\u6642\u3068\u751f\u6210\u65e5\u6642\u306e\u4e21\u65b9\u3092\u8a18\u9332\u3059\u308b - Memolog<\/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:\/\/doodlenote.net\/?p=1026\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"mysql\u306etimestamp\u578b\u3092\u4f7f\u3063\u3066\u66f4\u65b0\u65e5\u6642\u3068\u751f\u6210\u65e5\u6642\u306e\u4e21\u65b9\u3092\u8a18\u9332\u3059\u308b - Memolog\" \/>\n<meta property=\"og:description\" content=\"\u3044\u3044\u4e8b\u66f8\u3044\u3066\u3042\u308b\u3002\u3081\u3082 CREATE TABLE `test` ( id int(4) unsigned NOT NULL auto_increment, name varchar(10) , . .&hellip;Continue reading mysql\u306etimestamp\u578b\u3092\u4f7f\u3063\u3066\u66f4\u65b0\u65e5\u6642\u3068\u751f\u6210\u65e5\u6642\u306e\u4e21\u65b9\u3092\u8a18\u9332\u3059\u308b\" \/>\n<meta property=\"og:url\" content=\"https:\/\/doodlenote.net\/?p=1026\" \/>\n<meta property=\"og:site_name\" content=\"Memolog\" \/>\n<meta property=\"article:published_time\" content=\"-0001-11-30T00:00:00+00:00\" \/>\n<meta name=\"author\" content=\"\u4ffa\u69d8\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u4ffa\u69d8\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"1\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/doodlenote.net\/?p=1026#article\",\"isPartOf\":{\"@id\":\"https:\/\/doodlenote.net\/?p=1026\"},\"author\":{\"name\":\"\u4ffa\u69d8\",\"@id\":\"https:\/\/doodlenote.net\/#\/schema\/person\/b4d9e28d72f0b174ecabb474276c9cc1\"},\"headline\":\"mysql\u306etimestamp\u578b\u3092\u4f7f\u3063\u3066\u66f4\u65b0\u65e5\u6642\u3068\u751f\u6210\u65e5\u6642\u306e\u4e21\u65b9\u3092\u8a18\u9332\u3059\u308b\",\"datePublished\":\"-0001-11-30T00:00:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/doodlenote.net\/?p=1026\"},\"wordCount\":111,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/doodlenote.net\/#\/schema\/person\/b4d9e28d72f0b174ecabb474276c9cc1\"},\"keywords\":[\"OldBlog\"],\"articleSection\":[\"\u30d7\u30ed\u30b0\u30e9\u30e0\"],\"inLanguage\":\"ja\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/doodlenote.net\/?p=1026\",\"url\":\"https:\/\/doodlenote.net\/?p=1026\",\"name\":\"mysql\u306etimestamp\u578b\u3092\u4f7f\u3063\u3066\u66f4\u65b0\u65e5\u6642\u3068\u751f\u6210\u65e5\u6642\u306e\u4e21\u65b9\u3092\u8a18\u9332\u3059\u308b - Memolog\",\"isPartOf\":{\"@id\":\"https:\/\/doodlenote.net\/#website\"},\"datePublished\":\"-0001-11-30T00:00:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/doodlenote.net\/?p=1026#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/doodlenote.net\/?p=1026\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/doodlenote.net\/?p=1026#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u30db\u30fc\u30e0\",\"item\":\"https:\/\/doodlenote.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"mysql\u306etimestamp\u578b\u3092\u4f7f\u3063\u3066\u66f4\u65b0\u65e5\u6642\u3068\u751f\u6210\u65e5\u6642\u306e\u4e21\u65b9\u3092\u8a18\u9332\u3059\u308b\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/doodlenote.net\/#website\",\"url\":\"https:\/\/doodlenote.net\/\",\"name\":\"Memolog\",\"description\":\"\u6368\u3066\u308b\u306b\u306f\u60dc\u3057\u3044\u7a0b\u5ea6\u306e\u30b4\u30df\uff3e\uff3e\",\"publisher\":{\"@id\":\"https:\/\/doodlenote.net\/#\/schema\/person\/b4d9e28d72f0b174ecabb474276c9cc1\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/doodlenote.net\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/doodlenote.net\/#\/schema\/person\/b4d9e28d72f0b174ecabb474276c9cc1\",\"name\":\"\u4ffa\u69d8\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/doodlenote.net\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/fcda4a2c8afdf7f8db4d55e3ba71ce95258d02a3522b2c9aae85dfc5b59e56ef?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/fcda4a2c8afdf7f8db4d55e3ba71ce95258d02a3522b2c9aae85dfc5b59e56ef?s=96&d=mm&r=g\",\"caption\":\"\u4ffa\u69d8\"},\"logo\":{\"@id\":\"https:\/\/doodlenote.net\/#\/schema\/person\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"mysql\u306etimestamp\u578b\u3092\u4f7f\u3063\u3066\u66f4\u65b0\u65e5\u6642\u3068\u751f\u6210\u65e5\u6642\u306e\u4e21\u65b9\u3092\u8a18\u9332\u3059\u308b - Memolog","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:\/\/doodlenote.net\/?p=1026","og_locale":"ja_JP","og_type":"article","og_title":"mysql\u306etimestamp\u578b\u3092\u4f7f\u3063\u3066\u66f4\u65b0\u65e5\u6642\u3068\u751f\u6210\u65e5\u6642\u306e\u4e21\u65b9\u3092\u8a18\u9332\u3059\u308b - Memolog","og_description":"\u3044\u3044\u4e8b\u66f8\u3044\u3066\u3042\u308b\u3002\u3081\u3082 CREATE TABLE `test` ( id int(4) unsigned NOT NULL auto_increment, name varchar(10) , . .&hellip;Continue reading mysql\u306etimestamp\u578b\u3092\u4f7f\u3063\u3066\u66f4\u65b0\u65e5\u6642\u3068\u751f\u6210\u65e5\u6642\u306e\u4e21\u65b9\u3092\u8a18\u9332\u3059\u308b","og_url":"https:\/\/doodlenote.net\/?p=1026","og_site_name":"Memolog","article_published_time":"-0001-11-30T00:00:00+00:00","author":"\u4ffa\u69d8","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u4ffa\u69d8","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"1\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/doodlenote.net\/?p=1026#article","isPartOf":{"@id":"https:\/\/doodlenote.net\/?p=1026"},"author":{"name":"\u4ffa\u69d8","@id":"https:\/\/doodlenote.net\/#\/schema\/person\/b4d9e28d72f0b174ecabb474276c9cc1"},"headline":"mysql\u306etimestamp\u578b\u3092\u4f7f\u3063\u3066\u66f4\u65b0\u65e5\u6642\u3068\u751f\u6210\u65e5\u6642\u306e\u4e21\u65b9\u3092\u8a18\u9332\u3059\u308b","datePublished":"-0001-11-30T00:00:00+00:00","mainEntityOfPage":{"@id":"https:\/\/doodlenote.net\/?p=1026"},"wordCount":111,"commentCount":0,"publisher":{"@id":"https:\/\/doodlenote.net\/#\/schema\/person\/b4d9e28d72f0b174ecabb474276c9cc1"},"keywords":["OldBlog"],"articleSection":["\u30d7\u30ed\u30b0\u30e9\u30e0"],"inLanguage":"ja"},{"@type":"WebPage","@id":"https:\/\/doodlenote.net\/?p=1026","url":"https:\/\/doodlenote.net\/?p=1026","name":"mysql\u306etimestamp\u578b\u3092\u4f7f\u3063\u3066\u66f4\u65b0\u65e5\u6642\u3068\u751f\u6210\u65e5\u6642\u306e\u4e21\u65b9\u3092\u8a18\u9332\u3059\u308b - Memolog","isPartOf":{"@id":"https:\/\/doodlenote.net\/#website"},"datePublished":"-0001-11-30T00:00:00+00:00","breadcrumb":{"@id":"https:\/\/doodlenote.net\/?p=1026#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/doodlenote.net\/?p=1026"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/doodlenote.net\/?p=1026#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u30db\u30fc\u30e0","item":"https:\/\/doodlenote.net\/"},{"@type":"ListItem","position":2,"name":"mysql\u306etimestamp\u578b\u3092\u4f7f\u3063\u3066\u66f4\u65b0\u65e5\u6642\u3068\u751f\u6210\u65e5\u6642\u306e\u4e21\u65b9\u3092\u8a18\u9332\u3059\u308b"}]},{"@type":"WebSite","@id":"https:\/\/doodlenote.net\/#website","url":"https:\/\/doodlenote.net\/","name":"Memolog","description":"\u6368\u3066\u308b\u306b\u306f\u60dc\u3057\u3044\u7a0b\u5ea6\u306e\u30b4\u30df\uff3e\uff3e","publisher":{"@id":"https:\/\/doodlenote.net\/#\/schema\/person\/b4d9e28d72f0b174ecabb474276c9cc1"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/doodlenote.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":["Person","Organization"],"@id":"https:\/\/doodlenote.net\/#\/schema\/person\/b4d9e28d72f0b174ecabb474276c9cc1","name":"\u4ffa\u69d8","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/doodlenote.net\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/fcda4a2c8afdf7f8db4d55e3ba71ce95258d02a3522b2c9aae85dfc5b59e56ef?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/fcda4a2c8afdf7f8db4d55e3ba71ce95258d02a3522b2c9aae85dfc5b59e56ef?s=96&d=mm&r=g","caption":"\u4ffa\u69d8"},"logo":{"@id":"https:\/\/doodlenote.net\/#\/schema\/person\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/doodlenote.net\/index.php?rest_route=\/wp\/v2\/posts\/1026","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/doodlenote.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/doodlenote.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/doodlenote.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/doodlenote.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1026"}],"version-history":[{"count":0,"href":"https:\/\/doodlenote.net\/index.php?rest_route=\/wp\/v2\/posts\/1026\/revisions"}],"wp:attachment":[{"href":"https:\/\/doodlenote.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1026"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/doodlenote.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1026"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/doodlenote.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1026"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}