<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[[TM] LAST_INSERT_ID not working]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">It seems like this always returns 0 :<br />
<a href="https://dev.mysql.com/doc/refman/8.0/en/information-functions.html#function_last-insert-id" rel="nofollow ugc">https://dev.mysql.com/doc/refman/8.0/en/information-functions.html#function_last-insert-id</a></p>
<p dir="auto">For the following reason probably (quote from Stackoverflow)<br />
The problem seemed to be in MySQL's phpmyadmin config file PersistentConnections set to FALSE which resulted in a new CONNECTION_ID every time a query was issued - therefore rendering SELECT LAST_INSERT_ID() ineffective.</p>
<p dir="auto">Is there a way tog et the ID of the last inserted row ?<br />
I'm doing a "full" select after my insert now, it's not ideal <img src="https://community.appdrag.com/plugins/nodebb-plugin-emoji/emoji/android/1f615.png?v=lfk1vimvd74" class="not-responsive emoji emoji-android emoji--confused" title=":/" alt="😕" /></p>
<p dir="auto">Thanks,<br />
Best regarsd,</p>
]]></description><link>https://community.appdrag.com/topic/196/tm-last_insert_id-not-working</link><generator>RSS for Node</generator><lastBuildDate>Sun, 10 May 2026 18:09:43 GMT</lastBuildDate><atom:link href="https://community.appdrag.com/topic/196.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 06 Jul 2020 09:05:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [TM] LAST_INSERT_ID not working on Mon, 06 Jul 2020 10:45:58 GMT]]></title><description><![CDATA[<p dir="auto">Hey Pierre,</p>
<p dir="auto">This must be done in the same transaction, please check this tutorial about it:<br />
<a href="https://support.appdrag.com/blog/63-Inserting-a-Row-in-the-Database--Create-New-Row-Id.html?category=13" rel="nofollow ugc">https://support.appdrag.com/blog/63-Inserting-a-Row-in-the-Database--Create-New-Row-Id.html?category=13</a></p>
]]></description><link>https://community.appdrag.com/post/656</link><guid isPermaLink="true">https://community.appdrag.com/post/656</guid><dc:creator><![CDATA[Joseph Benguira]]></dc:creator><pubDate>Mon, 06 Jul 2020 10:45:58 GMT</pubDate></item></channel></rss>