PHP Classes

GetLastInsertID fix for untrimmed SQL queries (leading spaces)

Recommend this page to a friend!

      Ultimate MySQL  >  All threads  >  GetLastInsertID fix for untrimmed...  >  (Un) Subscribe thread alerts  
Subject:GetLastInsertID fix for untrimmed...
Summary:last_insert_id fix for queries with leading spaces
Messages:1
Author:Alex Zavrazhniy
Date:2013-12-21 07:11:28
 

  1. GetLastInsertID fix for untrimmed...   Reply   Report abuse  
Picture of Alex Zavrazhniy Alex Zavrazhniy - 2013-12-21 07:11:28
apply trim() on line 1111:
if (strpos(strtolower(trim($sql)), "insert") === 0) {

apply trim() on line 1121:
} else if(strpos(strtolower(trim($sql)), "select") === 0) {