SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Tutorials

Reply
 
Thread Tools Display Modes
Old 16/07/2013, 04:01 PM   #21
Kaperstone
High-roller
 
Kaperstone's Avatar
 
Join Date: May 2011
Location: Russia
Posts: 3,355
Reputation: 822
Default Re: How to use SQLite

Will be nice if you'll write a tutorial for SQLitei as well.
Anyway,nice tutorial !
__________________
Find me on GitHubSEF Community (Official NEF Successor) • SA:MP ReviewsFind me on Steam
Kaperstone is offline   Reply With Quote
Old 17/07/2013, 05:11 AM   #22
jozzuia
Little Clucker
 
jozzuia's Avatar
 
Join Date: Nov 2010
Location: C:/Grand Theft Auto San Andreas/editor.exe
Posts: 34
Reputation: 3
Default Re: How to use SQLite

Nice tutorial, extremely helpful; good luck with everything!
jozzuia is offline   Reply With Quote
Old 19/07/2013, 11:32 AM   #23
Konstantinos
Spam Machine
 
Konstantinos's Avatar
 
Join Date: Dec 2011
Posts: 11,986
Reputation: 1392
Default Re: How to use SQLite

Quote:
Originally Posted by xkirill View Post
Will be nice if you'll write a tutorial for SQLitei as well.
Anyway,nice tutorial !
I might do! Thanks anyway.

Quote:
Originally Posted by jozzuia View Post
Nice tutorial, extremely helpful; good luck with everything!
Thank you.
__________________
Life is like riding a bicycle. To keep your balance, you must keep moving.

[Tutorial] How to use SQLite
[FilterScript] Tune System
Konstantinos is offline   Reply With Quote
Old 19/07/2013, 01:52 PM   #24
Lordzy
High-roller
 
Join Date: Mar 2012
Location: NetherRealm
Posts: 2,769
Reputation: 1158
Default Re: How to use SQLite

Nice, well explained.
__________________
Currently inactive - I don't play at any SA-MP servers nor work on anything in PAWN for now. The projects that I've done so far in PAWN, which requires updates will be taking some time.
Lordzy is offline   Reply With Quote
Old 19/07/2013, 02:01 PM   #25
RedFusion
High-roller
 
RedFusion's Avatar
 
Join Date: Nov 2009
Location: Sweden
Posts: 1,065
Reputation: 278
Default Re: How to use SQLite

Make a tutorial about memory leaks in depth please, first time i heard about this in pawno scripting
__________________
Also known as fusez
RedFusion is offline   Reply With Quote
Old 19/07/2013, 03:27 PM   #26
Konstantinos
Spam Machine
 
Konstantinos's Avatar
 
Join Date: Dec 2011
Posts: 11,986
Reputation: 1392
Default Re: How to use SQLite

Thanks Lordz™.

@RedFusion - This issue is not about the PAWN, but SQLite. I guess it's the same on MySQL too. Though, it'd be difficult for me to explain in depth about memory leak like you said; however Wikipedia does explain it and it gives few examples. (https://en.wikipedia.org/wiki/Memory_leak). What happens pretty much is that you got less memory that you should have because of a memory leak.
__________________
Life is like riding a bicycle. To keep your balance, you must keep moving.

[Tutorial] How to use SQLite
[FilterScript] Tune System
Konstantinos is offline   Reply With Quote
Old 19/07/2013, 11:13 PM   #27
RedFusion
High-roller
 
RedFusion's Avatar
 
Join Date: Nov 2009
Location: Sweden
Posts: 1,065
Reputation: 278
Default Re: How to use SQLite

Ah, you made me think it occured elsewhere than SQL aswell
__________________
Also known as fusez
RedFusion is offline   Reply With Quote
Old 20/07/2013, 02:18 AM   #28
TDM
Banned
 
Join Date: Jul 2013
Location: Screw h8trs
Posts: 196
Reputation: 50
Default Re: How to use SQLite

nice work dwane...
TDM is offline   Reply With Quote
Old 22/07/2013, 12:19 AM   #29
ReneG
High-roller
 
Join Date: Oct 2011
Location: Sublime Text 2
Posts: 1,981
Reputation: 337
Default Re: How to use SQLite

This tutorial features nothing that hasn't been written already. Why don't you advocate the use of db_get_field rather than db_get_field_assoc? It only makes intuitive sense that integer comparisons are faster than string comparisons.
ReneG is offline   Reply With Quote
Old 24/07/2013, 07:11 PM   #30
Konstantinos
Spam Machine
 
Konstantinos's Avatar
 
Join Date: Dec 2011
Posts: 11,986
Reputation: 1392
Default Re: How to use SQLite

Quote:
Originally Posted by RedFusion View Post
Ah, you made me think it occured elsewhere than SQL aswell
I didn't have the intention to do it.

Quote:
Originally Posted by TDM View Post
nice work dwane...
Thanks

Quote:
Originally Posted by ReneG View Post
This tutorial features nothing that hasn't been written already. Why don't you advocate the use of db_get_field rather than db_get_field_assoc? It only makes intuitive sense that integer comparisons are faster than string comparisons.
I was referring to those with incorrect methods because some people STILL free a result when they don't have absolutely anything to free. It's indeed faster than comparing each field's name to match the field's name we gave but don't worry for that, the difference is very small.

EDIT: The tutorial has been updated. When the database uses INSERT INTO or UPDATE, the speed is not that good but we can change the speed (x62 times faster than the original way of SQLite) by using
Code:
db_query( Database, "PRAGMA synchronous = OFF" );
After opening the database! Please note; whenever the computer has the database got crashed or was closed for a reason the file will be corrupted. That's why you need to take backups frequently.
__________________
Life is like riding a bicycle. To keep your balance, you must keep moving.

[Tutorial] How to use SQLite
[FilterScript] Tune System

Last edited by Konstantinos; 28/07/2013 at 10:29 AM.
Konstantinos is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQLite [Ro]DuReX Română/Romanian 30 20/06/2013 12:47 PM
SQLite help CreativityLacker Scripting Help 2 12/05/2013 10:37 AM
SQLITE help Ryan_Obeles Scripting Help 9 28/04/2013 01:55 AM
Little help on sqlite FireCat Help Archive 4 20/08/2011 01:45 PM


All times are GMT. The time now is 04:26 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.