Question about mysql_insert_id
#5

Quote:
Originally Posted by ComDuck
View Post
mysql_insert_id is completely deprecated and will never work with the latest MySQL release. If you do really want to know the difference, mysql_insert_id gets the ID generated for an AUTO_INCREMENT column by the latest sent query.

cache_insert_id works the same way as mysql_insert_id, except that it will not retrieve the ID if there isn't any active cache (you did not run threaded query or set an active cache manually) in the server. See the example on cache_insert_id in the SA-MP wiki. If you are interested with playing around and seeing which functions will lead to an active cache, use the cache_is_any_active native after you call something.



As I've said, mysql_insert_id is deprecated so avoid using it where possible. Use the latest plugin release, thread your queries, and switch to using a cached system. Then, use cache_insert_id() as a drop-in replacement to mysql_insert_id().
Thank you!
Reply


Messages In This Thread
Question about mysql_insert_id - by ToiletDuck - 09.02.2019, 17:05
Re: Question about mysql_insert_id - by ComDuck - 09.02.2019, 17:35
Re: Question about mysql_insert_id - by ToiletDuck - 09.02.2019, 17:53
Re: Question about mysql_insert_id - by ComDuck - 09.02.2019, 18:21
Re: Question about mysql_insert_id - by ToiletDuck - 09.02.2019, 18:40

Forum Jump:


Users browsing this thread: 1 Guest(s)