<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>am1tanaka</author_name>
  <author_url>https://blog.hatena.ne.jp/am1tanaka/</author_url>
  <blog_title>tanaka's Programming Memo</blog_title>
  <blog_url>https://am1tanaka.hatenablog.com/</blog_url>
  <categories>
    <anon>Web</anon>
    <anon>PHP</anon>
    <anon>MySQL</anon>
  </categories>
  <description>keyword: PDO , prepare , drop tablePHPからMySQLを操作するのに、PDO(PHP Data Objects)を利用している。SQLの安全動作のために、prepare()を使おうとしたが、drop tableで権限エラーが発生した。その原因と対策をメモ。 バージョン MySQL4.0 PHP5.2.17 MySQLが古いので、最新版ならこの問題は発生しないかも。 症状 $db = new PDO('mysql:host=ホスト;dbname=データベース名' , ユーザ名 , パスワード); $stmt = $db-&gt;prepare('drop table…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fam1tanaka.hatenablog.com%2Fentry%2F2013%2F09%2F28%2F221418&quot; title=&quot;PDOのprepareでdrop tableに失敗する - tanaka&amp;#39;s Programming Memo&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2013-09-28 22:14:18</published>
  <title>PDOのprepareでdrop tableに失敗する</title>
  <type>rich</type>
  <url>https://am1tanaka.hatenablog.com/entry/2013/09/28/221418</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
