freddyb1 / easy-mysql Goto Github PK
View Code? Open in Web Editor NEWSimplifies the usage of MySQL, making it user friendly and similar to INI schemes.
License: Apache License 2.0
Simplifies the usage of MySQL, making it user friendly and similar to INI schemes.
License: Apache License 2.0
include\easy-mysql.inc(1116) : error 001: expected token: "-string end-", but found "-identifier-"
include\easy-mysql.inc(1169) : error 001: expected token: "-string end-", but found "-identifier-"
Line 1116 - handle = SQL::CreateTable(table, (isnull(column_where)) ? "InnoDB" : column_where, (isnull(column_where2)) ? "latin5" : column_where2, connectionHandle);
Line 1169 - handle = SQL::CreateTable(table, (isnull(column_where)) ? "InnoDB" : column_where, (isnull(column_where2)) ? "latin5" : column_where2, connectionHandle);
My bad. Great work :)
Hello, I'm newbie and I do not know much how to use the Git Hub, but I wanted to suggest an improvement.
I suggest we can select the log type on the connection:
stock MySQL:SQL::Connect(const host[], const user[], const password[], const database[], debugging = 0, port = 3306, bool:autoreconnect = true, pool_size = 2)
{
switch(debugging)
{
case 0: mysql_log(NONE);
case 1: mysql_log(ALL);
case 2: mysql_log(ERROR);
case 3: mysql_log(WARNING);
case 4: mysql_log(INFO);
case 5: mysql_log(DEBUG);
case 6: mysql_log(ERROR | WARNING);
case 7: mysql_log(ERROR | DEBUG);
case 8: mysql_log(ERROR | INFO);
case 9: mysql_log(WARNING | DEBUG);
case 10: mysql_log(WARNING | INFO);
case 11: mysql_log(INFO | DEBUG);
case 12: mysql_log(ERROR | WARNING | DEBUG);
case 13: mysql_log(ERROR | WARNING | DEBUG | INFO);
case 14: mysql_log(WARNING | DEBUG | INFO);
}
new MySQLOpt:options = mysql_init_options();
mysql_set_option(options, SERVER_PORT, port);
mysql_set_option(options, AUTO_RECONNECT, autoreconnect);
mysql_set_option(options, POOL_SIZE, pool_size);
new MySQL:SQL::mc = mysql_connect(host, user, password, database, options);
if(mysql_errno(SQL::mc) != 0)
{
SQL_Warning("Could not connect to database %s on host %s | user %s and password %s", database, host, user, password);
}
else
{
SQL_Notice("Successfully connected to database!");
}
return SQL::mc;
}
Hello, how to add new columns to the table after it's already been created by the first one?
table already created
if(!SQL::ExistsTable(SQL_PLAYERS_TABLE))
{
//If not, then create a table called 'players'.
new handle = SQL::Open(SQL::CREATE, SQL_PLAYERS_TABLE); //Opening a valid handle to create a table called 'players'
SQL::AddTableColumn(handle, "p_id", SQL_TYPE_INT, 11, true); //Setting auto-increment for this field.
SQL::AddTableColumn(handle, "p_name", SQL_TYPE_VCHAR, 24);
SQL::AddTableColumn(handle, "p_password", SQL_TYPE_VCHAR, 64);
SQL::AddTableColumn(handle, "p_score", SQL_TYPE_INT);
SQL::AddTableColumn(handle, "p_posx", SQL_TYPE_FLOAT);
SQL::AddTableColumn(handle, "p_posy", SQL_TYPE_FLOAT);
SQL::AddTableColumn(handle, "p_posz", SQL_TYPE_FLOAT);
SQL::Close(handle);//Closing the previous opened handle.
}
new field that needs to be added
SQL::AddTableColumn(handle, "health", SQL_TYPE_FLOAT);
I Didnt Understand At ReadRetrievedRows
Hello. I want to make something like this with this include:
function UpdateVar( playerid, varname[ ], varnameingame ) {
if(playerid == INVALID_PLAYER_ID) return 1;
gString[ 0 ] = (EOS);
mysql_format( SQL, gString, sizeof gString, "UPDATEusers
SET%s
= '%d' WHEREID
= '%d'", varname, varnameingame, PlayerInfo[ playerid ][ pSQLID ] );
mysql_tquery( SQL, gString, "", "" );
return 1;
}
Is possible? And how? I tried already to make it, but no result.
Hello. Is it possible to rank with the hand and bank money, adding the two?
new string[128], names[24],money;
new handle = SQL::OpenEx(SQL::MREAD, "Accounts", "", "", "", "", -1, 10, -1, "Money");
SQL::ReadRetrievedRows(handle, i)
{
SQL::ReadString(handle, "AccountName", names, 24, i);
SQL::ReadInt(handle, "Money", money, i);
format(string, sizeof(string), "Name %s | Money: %d", names,money);
SendClientMessage(playerid, -1, string);
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.