Raised This Month: $51 Target: $400
 12% 

[INC] SQLVault


Post New Thread Reply   
 
Thread Tools Display Modes
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-03-2011 , 00:28   Re: [INC] SQLVault
Reply With Quote #11

Quote:
Originally Posted by gladius View Post
Nice work that helpful very much to all people who don't know how to use SQL.

Mmmm I think you can do this more functionally. (something how work sorting.inc) For example: if someone makes a "top15", it is required to order.
I use this. SQL_PrepareQuery(Sql_Connection, "SELECT authid FROM `kzcl_pro15` WHERE mapname='%s' ORDER BY time LIMIT 15", mapname) bla bla bla

And why when you put something on the "vault" and it is not there, you use REPLACE instead of INSERT? is better? (I always use insert in such cases, then I want to know )
Thanks. That was the main goal of these includes.

You can use the read all function and then sort the cell array.

REPLACE will update when the primary key is found to be a duplicate from the one being inserted, and a new entry will be entered if the primary key does not exist.
It is basically the same as using INSERT INTO and the ON DUPLICATE KEY UPDATE clause.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
gladius
Veteran Member
Join Date: Jul 2008
Location: Santiago, Chile
Old 01-03-2011 , 01:09   Re: [INC] SQLVault
Reply With Quote #12

Yes, I did not think so. Now I read read all function, I understood.

Well, this was only a suggestion: D And i know if you want to use it, You need to know something more than the basics. But what happens to the protagonists of this thread(medium - low level programming) do you think that he know how to mix with sorting. Remember sorting is not easy to use, half complicated if this is your first time using it.(or to me) but I think if you do that, you need to modify the code a "bit much".

Yes, i know this is to everybody, not just specific people, but as I said, it's only a suggestion

I'm glad that someone has taken the time to do this.
__________________
Proyects
Kreedz Chile Mod [100%] (Fixing some details).


Last edited by gladius; 01-03-2011 at 01:12.
gladius is offline
Send a message via MSN to gladius Send a message via Skype™ to gladius
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-03-2011 , 01:13   Re: [INC] SQLVault
Reply With Quote #13

Sorting is not hard at all, actually.
I'm not just saying that because I'm experienced in it either.
AMXX has sorting functions which makes things easier and is very easy to understand.
In this case, ArraySort() would be used and there are plenty examples to help people who have never used it.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
gladius
Veteran Member
Join Date: Jul 2008
Location: Santiago, Chile
Old 01-03-2011 , 01:30   Re: [INC] SQLVault
Reply With Quote #14

haha found only replys from you, using ArraySort: D

Well I never used ArraySort, so now I will see and if I understand it, maybe I will make an example of how to make a top15: D (sql + sort)
__________________
Proyects
Kreedz Chile Mod [100%] (Fixing some details).

gladius is offline
Send a message via MSN to gladius Send a message via Skype™ to gladius
Jacob
Senior Member
Join Date: Oct 2010
Old 01-03-2011 , 06:29   Re: [INC] SQLVault
Reply With Quote #15

nicely done;
awesome;
+karma!!!!!!!!

Last edited by Jacob; 01-04-2011 at 05:15.
Jacob is offline
YakumoHiratsuhi
Veteran Member
Join Date: Dec 2010
Location: Dreαmlαnd.
Old 01-04-2011 , 12:40   Re: [INC] SQLVault
Reply With Quote #16

Fan-fuckin-tastic really nice job exolent.
__________________
"Podra parecer ridiculo o imposible, pero este es el camino que seguimos los verdaderos hombres, si hay un muro en el camino, lo derribamos, si no hay camino, haremos uno, con nuestras propias manos, porque el magma de nuestro corazón arde en llamas."
YakumoHiratsuhi is offline
Send a message via MSN to YakumoHiratsuhi
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 01-04-2011 , 21:42   Re: [INC] SQLVault
Reply With Quote #17

Quote:
Originally Posted by gladius View Post
Well, this was only a suggestion: D And i know if you want to use it, You need to know something more than the basics. But what happens to the protagonists of this thread(medium - low level programming) do you think that he know how to mix with sorting. Remember sorting is not easy to use, half complicated if this is your first time using it.(or to me) but I think if you do that, you need to modify the code a "bit much".
Watch this video. There are 5 in the set, but this will hopefully take away that mystery behind sorting and how to do it. It's not Pawn-specific, but it is easily translated over.

I was considering making a tutorial on this and implementing it into a ranking system, but I feel it will not do much good. Most intermediate-level programmers will not be able to grasp qsort, and the ones that are able to will probably have already had some experience with it. Bubblesort and insertion sorting are less efficient and may not be worth teaching in a full tutorial.

EDIT: Sorry, got a bit off-topic.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 01-05-2011 , 19:55   Re: [INC] SQLVault
Reply With Quote #18

WoooowWW, Exelent Work.!!
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
eXacT
Veteran Member
Join Date: Apr 2009
Location: Buenos Aires
Old 01-08-2011 , 22:30   Re: [INC] SQLVault
Reply With Quote #19

Thanks a lot, it is very helpfull for my =D
__________________

"There is no knowledge, that is not power"

Last edited by eXacT; 01-08-2011 at 22:31. Reason: sd
eXacT is offline
Send a message via MSN to eXacT Send a message via Skype™ to eXacT
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 01-18-2011 , 12:33   Re: [INC] SQLVault
Reply With Quote #20

I have a problem using this.
I've created another plugin using this and it works fine.
But now it keeps saying the SQlite isn't enabled. i can't figure this out.

in my plugin:
PHP Code:
g_Vault sqlv_open_local("Shop_Vault"); 
When i start the server:
Code:
L 01/18/2011 - 18:26:02: [test.amxx] SQLite module needs to be enabled in modules.ini to open local database
amxx modules:
Code:
Currently loaded modules:
      name                    version     author               status     
 [ 1] SQLite                  1.8.1.3746  AMX Mod X Dev Team   running    
 [ 2] Fun                     1.8.1.3746  AMX Mod X Dev Team   running    
 [ 3] CStrike                 1.8.1.3746  AMX Mod X Dev Team   running    
 [ 4] CSX                     1.8.1.3746  AMX Mod X Dev Team   running    
 [ 5] Ham Sandwich            1.8.1.3746  AMX Mod X Dev Team   running    
 [ 6] FakeMeta                1.8.1.3746  AMX Mod X Dev Team   running    
 [ 7] Engine                  1.8.1.3746  AMX Mod X Dev Team   running    
7 modules, 7 correct
modules.ini
Code:
;;;
; To enable a module, remove the semi-colon (;) in front of its name.
; If it's not here, simply add it its name, one per line.
; You don't need to write the _amxx part or the file extension.
;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; SQL Modules usually need to be enabled manually ;;
;; You can have any number on at a time.  Use      ;;
;;  amx_sql_type in sql.cfg to specify the default ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;mysql
sqlite

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Put third party modules below here.              ;;
;; You can just list their names, without the _amxx ;;
;;  or file extension.                              ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; These modules will be auto-detected and loaded   ;;
;;  as needed.  You do not need to enable them here ;;
;;  unless you have problems.                       ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

fun
;engine
;fakemeta
;geoip
;sockets
;regex
;nvault
cstrike
csx
;hamsandwich
Sorry if this has nothing to do with your include,
i'm still new to this stuff.
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
Reply



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

Forum Jump


All times are GMT -4. The time now is 16:03.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode