<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>pospome</author_name>
  <author_url>https://blog.hatena.ne.jp/pospome/</author_url>
  <blog_title>pospomeのプログラミング日記</blog_title>
  <blog_url>https://www.pospome.work/</blog_url>
  <categories>
    <anon>MySQL</anon>
    <anon>PHP</anon>
  </categories>
  <description>手法としては2つ。1.phpの「mysqliクラスのinsert_idプロパティ」を使う。2.Mysqlの「LAST_INSERT_ID()」を使う。 select last_insert_id as id;両方共取得する対象列がauto increment である必要がある。 これに関しては、普段から主キーとしてidを定義しているから大丈夫。違いとしては、phpの「insert_idプロパティ」は insert にしか効果がない。 update には無効。mysqlの「LAST_INSERT_ID()」はupdateにも効果がある。 ただし、対象列が自動採番でされないとダメ。 直接値をins…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.pospome.work%2Fentry%2F20120929%2F1348893378&quot; title=&quot;最新レコードの取得 - pospomeのプログラミング日記&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>2012-09-29 13:36:18</published>
  <title>最新レコードの取得</title>
  <type>rich</type>
  <url>https://www.pospome.work/entry/20120929/1348893378</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
