SQLite Question - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: SQLite Question (
/showthread.php?tid=175514)
SQLite Question -
Norn - 10.09.2010
Has anyone created a function similar to mysqls mysql_insert_id(); function for SQLite usage?
Because right now what I can do is limited because I need it to return the ID of the auto-increment named id.
I would assume that the easiest way would be to loop through all id's and find the highest, but then again if by some chance another query was executed before the loop had finished then it would return an ID of another item, or is there another way to do it?
Pretty confused about this because I'm not that used to mysql never mind sqlite although I've had no problems as of yet.
Any ideas?
Re: SQLite Question -
iJumbo - 10.09.2010
SQLite is a program right ? try use Navicat
Re: SQLite Question -
Norn - 10.09.2010
What has this got to do with anything?
Re: SQLite Question -
playbox12 - 10.09.2010
Offtopic didn't you leave samp?
Well, you should you use mysql, its quite easier, I am sorry I can't help you any further because I honestly never touched SQLite.
Re: SQLite Question -
Calgon - 10.09.2010
Try MAX(field_name) in your query
Quote:
Originally Posted by playbox12
Offtopic didn't you leave samp?
Well, you should you use mysql, its quite easier, I am sorry I can't help you any further because I honestly never touched SQLite.
|
Then don't bother posting, and you clearly have no clue about the differences.
Quote:
Originally Posted by gigi1223
SQLite is a program right ? try use Navicat
|
SQLite is an open source SQL database system built into the SA:MP server. No additional plugins are required to use SQLite. This feature of SA:MP was introduced in version 0.2.2.
The database files of SQLite files are commonly stored in .db files and are accessed in the servers \scriptfiles\ directory.
Re: SQLite Question -
Norn - 10.09.2010
Solved, had to create a custom function.