![]() |
How do I use SQLite?
I have read the wiki post on it but I cannot seem to grasp the whole concept. Could someone post a dumbed down tutorial on it or an example like:
creating a table then adding something to it then making the player.chat something from the table. I can't seem to grasp how to make a table, would I just do something similar to this? PHP Code:
|
I started writing a tutorial for it, but never finished. It's a good starting point, though. You can find it here.
Once you've gotten a basic understanding, I'm willing to answer any questions you have (and I'm sure others are too). EDIT: Oh, I see what you mean. PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
That's the article I was talking about, I don't really know anything other than req() is as it's the only GS2 function i see in there. All I really see is how to interact with SQLExplorer. If you could give me a simple example in GS how to store variables in a table I think I'll probably catch on to the other stuff.
|
Quote:
|
Quote:
|
Quote:
PHP Code:
PHP Code:
|
Quote:
edit: nevermind I found it. edit edit: no i didnt ;[ edit edit edit: i think i found it this time |
Well, I have dumbed it down as simple as I could and can't seem to get this working ;[, any ideas on what I'm doing wrong?
PHP Code:
|
Quote:
|
It doesn't seem to be showing an error in it.
Edit: I'll mess with it tomorrow because I'm tired, I'm sure I'll be able to figure it out by myself when I'm rested. |
Quote:
What I noticed is that you didn't specify a type for "account" when creating the table. |
It's being created as is, I fixed what you were just talking about and still nothing.
PHP Code:
Edit: Wil Soul is wrong...... |
When using SELECT you expect it to return something, so the second parameter should be 'true'.
|
That was totally the problem, thank you for being so awesome and helping. I wouldn't have been such a nuisance if I wasn't so tired haha.
|
The second parameter for requestsql() is an optimization thing kindof: if you specify 'false' then it's just sending the query and forgetting about it, if you specify 'true' then it's getting the query result and possible errors.
|
| All times are GMT +2. The time now is 02:13 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.