[Include] [BETA] BUD - Blazing User DB
#41

Quote:
Originally Posted by Slice
Посмотреть сообщение
This uses SQLite, you just need to use the functions and BUD takes care of everything else. You can use PDO or the sqlite3_* functions in PHP to connect to the database (which will be in your "scriptfiles" folder).
You are maker of this script, so im sure you could help me?
Reply
#42

ah wonderful peace of work , keep it up , Slice !
Reply
#43

Quote:
Originally Posted by ddnbb
Посмотреть сообщение
You are maker of this script, so im sure you could help me?
Yeah connecting to php will require your help Slice! Thanks bro
Reply
#44

PHP код:
<?php
echo '<pre>';
$db = new SQLite3('/path/to/scriptfiles/database.db');
$result $db->query('SELECT * FROM users');
while ((
$row $result->fetchArray())) {
    
print_r($row);
}
echo 
'</pre>';
?>
Reply
#45

How to change pass using that system ?

I using Whirlpool
Reply
#46

Very nice, will help many people!
Reply
#47

Is there any known bugs with this? I love this system though
Reply
#48

Anyone know?

http://forum.sa-mp.com/showthread.ph...47#post1733647
Reply
#49

http://pastebin.com/QqGsdykm

Why wont this give my player his money on login? I looked at the database and I have 5000 dollars but when I login i get 0
Reply
#50

Quote:
Originally Posted by Retardedwolf
Посмотреть сообщение
Awesome. can't wait for the 'more powerful version'.
Me too.
Also I've done a really helpful tutorial for ALL of it's functions, despite old ones.

See HERE or in my signature.
Reply
#51

Why aren't you creating an index for the uid and name?

pawn Код:
private BUD::CreateDatabase() {
    if (!BUD::GetDB())
        return false;
   
    db_query(g_dbKeptAlive, "CREATE TABLE users (" DEFAULT_COLUMNS ")");
    db_query(g_dbKeptAlive, "CREATE INDEX uid_idx ON users (uid)");
    db_query(g_dbKeptAlive, "CREATE INDEX name_idx ON users (name)");
   
    return true;
}
Reply
#52

Quote:
Originally Posted by The King's Bastard
Посмотреть сообщение
Why aren't you creating an index for the uid and name?

pawn Код:
private BUD::CreateDatabase() {
    if (!BUD::GetDB())
        return false;
   
    db_query(g_dbKeptAlive, "CREATE TABLE users (" DEFAULT_COLUMNS ")");
    db_query(g_dbKeptAlive, "CREATE INDEX uid_idx ON users (uid)");
    db_query(g_dbKeptAlive, "CREATE INDEX name_idx ON users (name)");
   
    return true;
}
I didn't have much database knowledge when I made this. I'll add that when I get home.
Reply
#53

Indices should increase performance. The index on name should increase performance when searching for the uid and the index on uid should increase performance when getting data for a specific uid.

//EDiT: The index on uid might be redundant as it is a primary key. I'm sure but it's possible that SQLite creates indices on primary keys by default.
Reply
#54

Yes uid is a primary key so that's all good, but I should've added an index on name.
Reply
#55

I keep getting pawno\include\Bud.inc(5) : fatal error 100: cannot read from file: "&lt;a_samp&gt;" Compiled fine before I added #include <bud>
Reply
#56

Quote:
Originally Posted by x2gKaos
Посмотреть сообщение
I keep getting pawno\include\Bud.inc(5) : fatal error 100: cannot read from file: "&lt;a_samp&gt;" Compiled fine before I added #include <bud>
Just download the include file again. You probably messed something up when uploading/downloading it.
Reply
#57

Quote:
Originally Posted by Slice
Посмотреть сообщение
Just download the include file again. You probably messed something up when uploading/downloading it.
Yupp, Thank you! Awesome include btw. Thanks for releasing it.
Reply
#58

Thanks Slice, i might start using this instead the OLD Saving system such as OnPlayerLogin,OnPlayerStatsUpdate.
Reply
#59

Man this is very goooooood
Reply
#60

How can i make the password to be case sensitive?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)