Making A simple User DataBase with SQLite -
Youice - 08.02.2013
removed.
Re: Making A simple User DataBase with SQLite -
u3ber - 08.02.2013
i recognize most of the explanation in the introduction from the sqlite website, but it's always a good idea to have it here on forums.
note -> you have a header called "feature" but it links me to the sqlite website. If I wanted information from the sqlite website I wouldn't be looking here in the first place, i'd just visit their site (which is probably more accurate). it'd be best to list any findings/information from the site directly (that's the purpose of brief explanations, but make sure it's sourced).
and if i were to copy pasta like most people do, i'd get errors and probably whine and complain in this thread (hint: close your strings).
other than that, it's OK i guess.
Re: Making A simple User DataBase with SQLite -
Youice - 08.02.2013
Quote:
Originally Posted by arbit
i recognize most of the explanation in the introduction from the sqlite website, but it's always a good idea to have it here on forums.
note -> you have a header called "feature" but it links me to the sqlite website. If I wanted information from the sqlite website I wouldn't be looking here in the first place, i'd just visit their site (which is probably more accurate). it'd be best to list any findings/information from the site directly (that's the purpose of brief explanations, but make sure it's sourced).
and if i were to copy pasta like most people do, i'd get errors and probably whine and complain in this thread (hint: close your strings).
other than that, it's OK i guess.
|
Okay Thanks and yes I took few lines from the main site to help me introducing SQLite better here.
Re: Making A simple User DataBase with SQLite -
ReneG - 09.02.2013
Then cite your sources. You basically copied it word-for-word, and just changed the order a bit. Even if this just a mod for a 9 year old game, the rules of plagiarism still apply.
Also, I would have really liked this tutorial if you didn't use crappy methods. Everyone using SQLite should take advantage of an auto increment field, and also make use of db_get_field. Theoretically (I say that because I haven't looked through the sqlite source) db_get_field_assoc has to run a loop comparison through all the field names in order to return data causing you to lose time.
In other words, this tutorial is pretty much the same as all of the other ones posted, and doesn't really explain much.
Re: Making A simple User DataBase with SQLite - T0pAz - 09.02.2013
No explanation whatsoever. Just some bunch of tutorials from other sites stacked up.
Re: Making A simple User DataBase with SQLite -
new121 - 11.02.2013
PHP код:
forward public UpdateData(playerid);
public UpdateData(playerid)
{
new
Query[200],
name[MAX_PLAYER_NAME]
;
GetPlayerName(playerid, name, sizeof(name));
format(Query,sizeof(Query),"UPDATE `USERS` SET CASH = '%d' WHERE `NAME` = '%s' COLLATE NOCASE", GetPlayerMoney(playerid), DB_Escape(name));
db_free_result(db_query(Users, Query));
return 1;
}
Any reason why you are using callbacks rather then stock functions? Stock functions use less cpu.
Re: Making A simple User DataBase with SQLite -
Franx - 11.02.2013
You should of used more up to date methods of SQLite like Slice's BUD.
Re: Making A simple User DataBase with SQLite -
Voxel - 10.11.2013
theres a mistake,
should be
otherwise you get
pawn Код:
error 017: undefined symbol "ConnectSQL"
this is because you forwarded
pawn Код:
forward public ConnectSQLite(); //<---- SQLite and not SQL.
public ConnectSQLite()
{
Users = db_open("PlayersBase.db");
db_query(Users, "CREATE TABLE IF NOT EXISTS `USERS` (`NAME`, `PASSWORD`, `CASH`)");
print("[SQL]:`Has connected Succesfully`");
return 1;
}
Re: Making A simple User DataBase with SQLite -
Voxel - 10.11.2013
I did everything correctly but everytime i relog a new account is made in the database and the money doesnt save correctly. sorry but this tutorial is messed up.