Learning SQ_Lite

Started by Mötley, Mar 28, 2016, 07:59 PM

Previous topic - Next topic

Mötley

Okay I have took into considerations of learning SQ_Lite

Only thing is I feel like I am learning an entire new language.

QuoteLooks like nuclear codes

How would I go about saving a players skin and everything else as I would with WriteIni?

I would like to learn this style as I feel that it would be rather interesting. But I do not understand how to do everything else that I do happen to know "I feel like I am starting all over again"


So I would like to ask a Few Questions
:: Browsers What is the best browser to use??
:: Saving data like Skins, Admin Levels, Wanted level, Times Busted, Showing kill stats in /stats MessagePlayer( "etc");?

I am sure if anyone hear is Really good with Ini they could understand where I am coming from.
I want to be capable of saving all the data as I would normally with Ini's

I can script its just its new for me
So some type of boost would be extremely liked
~Motley

KAKAN

You need to have a bit knowledge about SQL syntax. If you don't have knowledge about that, you can learn it from here
Basically, to select something, use this:
local query = QuerySQL( SQLDatabase, "SELECT Money, Skins FROM Accounts WHERE Name='Motley'" ), cash = GetSQLColumnData( query, 0 ), skins = GetSQLColumnData( query, 1 );
if( !cash ) return;
print( "Motley have " + cash + "$ and " + skins + " skins.");
oh no

Mötley

So it is like learning a new language from what it feels like.

Isn't it about the same as mysql?

How long would it take for someone to learn this method let's say in my terms without introducing ini

I could build a deathmatch, maybe some cool pay n sprays. the typical non saving account system but being a noob to a new language how hard is it to grasp.?

I would like to know! As well as how simple can you make it look? as I have seen some peoples work look complex. where as some is some what simple looking.

The methods of studies right now for myself is looking at LUS for LU

http://forum.liberty-unleashed.co.uk/index.php/topic,746.msg4225.html#msg4225

And Fuzzie's account system in VCMP to understand it a little faster.

Seems Force made his version a little complex as Fuzzie did his easier to view

EK.IceFlake

I had the same situation as you, I was coming from 0.3 and had no knowledge in sqlite so I had to stick with inis. But I learnt it :P
The most important resource is the sqlite official website - it gives commands in the simplest form possible.
Also for a browser I recommend SQLite browser.
Here are some important commands:
select n1 from n2
- n1: Can either be * to select all columns or column names
- n2: Table to select
select n1 from n2 where n3 = n4
- n1: Can either be * to select all columns or column names
- n2: Table to select
- n3: Column for condition
- n4: What the value of n3 should be to include in the returned table


Also you need GetSQLColumnData and GetSQLNextRow more info on that later.
And the update query https://www.sqlite.org/lang_update.html
[sorry too lazy to put here]

.

#4
Just google online for SQL video tutorials man. SQL is the standard, SQLite and MySQL can chose to implement that standard fully or partially but also add features of their own. Therefore, as long as you learn SQL you should technically know both SQLite and/or MySQL or any other database out there which uses the SQL language.

There's a plethora of video or written tutorials out there for SQL/SQLite/MySQL etc. And yes it does take a while to adjust if you have no previous experience. But as with all things, the key is, practice.



So stop complaining to us about why you should learn SQL because there's nothing we can do about it. If you think in the world of programming, everything can be solved with just a single language then I'm sorry to break it to you but you're very wrong. Take web-development for example. Where you need to know HTML/5, CSS2/3, JavaScript, PHP, SQL etc. and the plethora of frameworks out there like jQuery for JavaScript or Bootstrap for UI or CodeIgniter for PHP and so on... (I've chosen the simple ones as an example!) And also you need to know about the various inconsistencies between web-browsers because every dictionary contains the word "standard" but no one knows what it stands for.
.

Mötley

@S.L.C https://www.codecademy.com

Friend of mine is in school for coding etc and pointed me to hear