31.05.2014, 12:15
(
Last edited by iRaiDeN; 31/05/2014 at 03:17 PM.
)
Hey,
So in short the day I worked more on Include , I added a few things , Haynklod tested , it works great , here are all the functions ,
Features :
A few concepts
varcahr - Necklaces
varcahr - Necklaces
int - integer,
float - float.
There are a few more , but these beauty samples .
This function actually opens a new table, its parameters ,
handle - the variable which is compared to a database connection .
tablename - the table name opens .
data - which values bring , including their type .
Example Usage -
Basically we created a table named oz , with values
username - name of the player .
password - password.
kills - kills .
x - just location.
This is actually supposedly creates a new line institutionalized , its parameters ,
handle - the variable which is compared to a database connection .
tablename - the table name , where we will create a new line .
data - while the " keys " row.
values - what was the value of the " keys " .
Example Usage -
We have created a new line with the quota "is username & password & kills & x .
Enter the username key value - iRaiDeN .
Enter the password key value - 123123 .
Enter the key kills the value - 2 .
And key x income the value - 1.1 .
This function is used to delete a table .
handle - the variable which is compared to a database connection .
tablename - which table to delete.
Example Usage -
Actually here we deleted the table oz simple .
This function is very similar to the function of INI_ParseFile , but its parameters are different.
handle - the variable which is compared to a database connection .
tablename - which table limit pumping .
loadpublic - which it called Public ( Public obligated to create a parameter playerid ) .
Example Usage -
Actually we took all the values from the table oz variables , such simple.
handle - the variable which is compared to a database connection .
tablename - where it will set the value , how a table .
field - what value to change.
value - what would the new value .
where & towhere - this will determine where the key where its value is equal to towhere .
Example Usage -
Basically we set the kills to 20 , where the key equal to iRaiDeN username .
handle - the variable which is compared to a database connection .
tablename - where it will set the value , how a table .
field - what value to change.
value - what would the new value .
where & towhere - this will determine where the key where its value is equal to towhere .
Example Usage -
Basically we set the key password the value oz1212 .
handle - the variable which is compared to a database connection .
tablename - where it will set the value , how a table .
field - what value to change.
value - what would the new value .
where & towhere - this will determine where the key where its value is equal to towhere .
Example Usage -
Basically we set the value 2.2 x key .
ChangeLog :
Download.
View code.
** Please do not remark about SQL Injection, if someone can explain it for me to explain.
** Warning: Do not in this include Anti SQL Injection this.
Enjoy!
So in short the day I worked more on Include , I added a few things , Haynklod tested , it works great , here are all the functions ,
Features :
PHP Code:
osql_CreateTable(handle,tablename[],data[]);osql_CreateLine(handle,tablename[],data[],values[]);
osql_DeleteTable (handle, tablename []);
osql_Load (dbhandle, tablename [], loadpublic []);
osql_SetInt (handle, tablename [], field [], value [], where [], towhere []);
osql_SetString (handle, tablename [], field [], & value [], where [], towhere []);
osql_SetFloat (handle, tablename [], field [], & Float: value [], where [], towhere []);
varcahr - Necklaces
varcahr - Necklaces
int - integer,
float - float.
There are a few more , but these beauty samples .
PHP Code:
osql_CreateTable (handle, tablename [], data []);
handle - the variable which is compared to a database connection .
tablename - the table name opens .
data - which values bring , including their type .
Example Usage -
PHP Code:
osql_CreateTable (Handle, "oz", "username varchar (40), password varchar (40), kills int, x float");
username - name of the player .
password - password.
kills - kills .
x - just location.
PHP Code:
osql_CreateLine (handle, tablename [], data [], values ​[])
handle - the variable which is compared to a database connection .
tablename - the table name , where we will create a new line .
data - while the " keys " row.
values - what was the value of the " keys " .
Example Usage -
PHP Code:
osql_CreateLine (Handle, "oz", "username, password, kills, x", "'iRaiDeN', '123123 ', '2', '1 .1 '");
Enter the username key value - iRaiDeN .
Enter the password key value - 123123 .
Enter the key kills the value - 2 .
And key x income the value - 1.1 .
PHP Code:
osql_DeleteTable (handle, tablename [])
handle - the variable which is compared to a database connection .
tablename - which table to delete.
Example Usage -
PHP Code:
osql_DeleteTable (Handle, "oz");
PHP Code:
osql_Load (handle, tablename [], loadpublic [])
handle - the variable which is compared to a database connection .
tablename - which table limit pumping .
loadpublic - which it called Public ( Public obligated to create a parameter playerid ) .
Example Usage -
PHP Code:
new someString [128],
****someInt ,
****Float : somePos ;
public OnPlayerConnect (playerid) return osql_Load (Handle, "oz", "loadPlayer");
forward loadPlayer (playerid);
public loadPlayer (playerid)
{
****cache_get_field_content (0, "password", someString, Handle, 128);
****someInt = cache_get_field_content_int (0, "kills", Handle);
****somePos = cache_get_field_content_float (0, "x", Handle);
****return 1 ;
}
PHP Code:
osql_SetInt (handle, tablename [], field [], value [], where [], towhere [])
tablename - where it will set the value , how a table .
field - what value to change.
value - what would the new value .
where & towhere - this will determine where the key where its value is equal to towhere .
Example Usage -
PHP Code:
osql_SetInt (Handle, "oz", "kills", "20", "username", "iRaiDeN");
PHP Code:
osql_SetString (handle, tablename [], field [], & value [], where [], towhere [])
tablename - where it will set the value , how a table .
field - what value to change.
value - what would the new value .
where & towhere - this will determine where the key where its value is equal to towhere .
Example Usage -
PHP Code:
osql_SetString (Handle, "oz", "password", "oz1212", "username", "iRaiDeN");
PHP Code:
osql_SetFloat (handle, tablename [], field [], & Float: value [], where [], towhere [])
tablename - where it will set the value , how a table .
field - what value to change.
value - what would the new value .
where & towhere - this will determine where the key where its value is equal to towhere .
Example Usage -
PHP Code:
osql_SetFloat (Handle, "oz", "x", 2.2, "username", "iRaiDeN");
ChangeLog :
PHP Code:
Added another three functions
Bugs have been fixed
View code.
** Please do not remark about SQL Injection, if someone can explain it for me to explain.
** Warning: Do not in this include Anti SQL Injection this.
Enjoy!