Re : [REL] MySQL Plugin (Now on github!) -
S4t3K - 26.03.2015
I'm testing it on a local server, on Windows.
Re: [REL] MySQL Plugin (Now on github!) -
Banditukas - 27.03.2015
Here is some buggs. One time i on my gamemode all was loading (mysql) houses, bussines server crashed due unknow error (by crash detector), but there writes mysql, i reload server then everything okey, it'is maybe 1 way from 1000 that happin small but still there haven't be that.
Re: [REL] MySQL Plugin (Now on github!) -
skydux123 - 28.03.2015
Please fix the link
Re: [REL] MySQL Plugin (Now on github!) -
dusk - 28.03.2015
Why does cache_get_field_contente_int fail on converted types?
Table:
Code:
CREATE TABLE IF NOT EXISTS graffiti_colours
(
id INT AUTO_INCREMENT NOT NULL,
name VARCHAR(32) NOT NULL,
argb VARCHAR(8) NOT NULL,
PRIMARY KEY(id)
) ENGINE=INNODB DEFAULT CHARSET cp1257 COLLATE=cp1257_bin;
Query:
Code:
SELECT id, CONVERT(CONV(argb, 16, 10), SIGNED) AS argb FROM graffiti_colours WHERE name = '%e'
Code:
pawn Code:
cache_get_field_content_int(0, "argb");
Log:
Code:
20:47:45 cache_get_field_content_int OK row: 0, field_name: "argb", connection: 1
20:47:45 CMySQLResult::GetRowDataByName OK row: '0', field: "argb", data: "4294901760"
20:47:45 cache_get_field_content_int ERROR invalid datatype
Re: [REL] MySQL Plugin (Now on github!) -
Vince - 28.03.2015
I believe it returns a 64 bit integer, which Pawn cannot handle. Not sure why you're not simply storing the color as an int rather than a varchar in the first place.
Re: [REL] MySQL Plugin (Now on github!) -
dusk - 28.03.2015
Just for the ability to see it as a HEX in the database. I know that that should not be a factor when designing a database but...
Re: [REL] MySQL Plugin (Now on github!) -
DarkPower2 - 30.03.2015
link not work!
Re: [REL] MySQL Plugin (Now on github!) -
DetoNater - 31.03.2015
there's a problem loading the plugin. I have the latest versions of includes and I have 2012 Redistributable
Re: [REL] MySQL Plugin (Now on github!) -
dusk - 31.03.2015
Quote:
Originally Posted by DarkPower2
link not work!
|
Its on github... they work.
Quote:
Originally Posted by DetoNater
there's a problem loading the plugin. I have the latest versions of includes and I have 2012 Redistributable
|
What kind of problem? Any error messages or the loading just fails?
Re : [REL] MySQL Plugin (Now on github!) -
MrAlexisX2 - 31.03.2015
New link for MYSQL R7 ?
EDIT : If you don't find the link, I give this website for you :
http://kaperstone.ru/samp/mysql/
Re : [REL] MySQL Plugin (Now on github!) -
S4t3K - 31.03.2015
This version is clearly outdated.
If there were updates, that's not only for the fun to work on a plugin : it adds new features and improvements.
If those version are not advocated, it's mainly because you see better, easier to learn/use and faster.
Those who stick with R7 are just too lazy to update their modes.
Re: [REL] MySQL Plugin (Now on github!) -
ihatetn931 - 01.04.2015
delete found my answer
Re: [REL] MySQL Plugin (Now on github!) -
Anuris - 01.04.2015
Hello BlueG.
Some kind of issue here...
SA-MP server 0.3z R4 with MySQL R39-3, running on Debian x64.
PHP Code:
//In some public
new qwery[300];
format(qwery, sizeof(qwery), "SELECT `lvl` FROM `admins` WHERE BINARY `Nick` = '%s'", GN(playerid));
mysql_function_query(MySQL, qwery, true, "OnAdminQueryFinished", "i", playerid);
SendClientMessage(playerid, -1, qwery);
PHP Code:
public OnAdminQueryFinished(playerid)
{
new lvl = cache_get_row_int(0,0);
SendMes(playerid, -1, "%i", lvl);
if(lvl > 0)
{
//Don't exec
}
else
{
//exec
}
return 0;
}
As you see, I've added 2 debugging messages.
They sends:
Code:
[15:09:17] SELECT `lvl` FROM `admins` WHERE BINARY `Nick` = 'Эраст_Фандорин'
[15:09:17] 0
But, if I exec the same Query (just copy it from chat log) in phpmyadmin,
it will return 10, not 0.
Here is a point: I'm adding some symbols from Russian alphabet in my Query (`Nick` = '
Эраст_Фандорин'), but it works just fine with phpmyadmin.
UPD: works fine without Russian symbols...can you fix it, please?
Re: [REL] MySQL Plugin (Now on github!) -
iZN - 01.04.2015
@Anuris:
pawn Code:
public OnAdminQueryFinished(playerid)
{
// first we've to check whether there are any results, if yes, it will simply continue.. otherwise, nothing will happen, you could add an else statement to the following if statement if you wanted to do something about when there are no row existing rows.
if(cache_get_row_count())
{
new lvl = cache_get_row_int(0,0);
SendMes(playerid, -1, "%i", lvl);
if(lvl > 0)
{
//Don't exec
}
else
{
//exec
}
}
return true; // returning true will clear out this callback's cache.
}
Re: [REL] MySQL Plugin (Now on github!) -
iZN - 03.04.2015
Quote:
Originally Posted by Ralfie
Hi, how can if find if a specific word in a string im providing matches a row i have?
i.e:
string = "Hello World"
Table:
Something more like the strfind function: if (~strfind("World", "Hello Wrold", true))
|
LIKE(). I guess there is another one that I don't seem to remember.
PHP Code:
SELECT * FROM tbl_name WHERE tbl_field LIKE "% foo %";
Re: [REL] MySQL Plugin (Now on github!) -
Anuris - 09.04.2015
I'm sorry, but...bump!
Quote:
Originally Posted by Anuris
Hello BlueG.
Some kind of issue here...
SA-MP server 0.3z R4 with MySQL R39-3, running on Debian x64.
PHP Code:
//In some public
new qwery[300];
format(qwery, sizeof(qwery), "SELECT `lvl` FROM `admins` WHERE BINARY `Nick` = '%s'", GN(playerid));
mysql_function_query(MySQL, qwery, true, "OnAdminQueryFinished", "i", playerid);
SendClientMessage(playerid, -1, qwery);
PHP Code:
public OnAdminQueryFinished(playerid)
{
new lvl = cache_get_row_int(0,0);
SendMes(playerid, -1, "%i", lvl);
if(lvl > 0)
{
//Don't exec
}
else
{
//exec
}
return 0;
}
As you see, I've added 2 debugging messages.
They sends:
Code:
[15:09:17] SELECT `lvl` FROM `admins` WHERE BINARY `Nick` = 'Эраст_Фандорин'
[15:09:17] 0
But, if I exec the same Query (just copy it from chat log) in phpmyadmin, it will return 10, not 0.
Here is a point: I'm adding some symbols from Russian alphabet in my Query (`Nick` = ' Эраст_Фандорин'), but it works just fine with phpmyadmin.
UPD: works fine without Russian symbols...can you fix it, please?
|
Re: [REL] MySQL Plugin (Now on github!) -
MotherDucker - 10.04.2015
Quote:
Originally Posted by iZN
|
No, I just don't know how to use threading.
If anyone does know how to use threading, could you please make a topic on how to use it with the newest release or if there already is a topic please can you link me?
Re: [REL] MySQL Plugin (Now on github!) -
iZN - 10.04.2015
Quote:
Originally Posted by MotherDucker
No, I just don't know how to use threading.
If anyone does know how to use threading, could you please make a topic on how to use it with the newest release or if there already is a topic please can you link me?
|
https://sampforum.blast.hk/showthread.php?tid=337810
it's outdated but it should be fine, and then
use the wiki for more details about the latest functions.
Re: [REL] MySQL Plugin (Now on github!) -
Ahmad45123 - 15.04.2015
Whenever I include mysql, It crashes the compiler... Any fix is appreciated.
Please note that I dont use any functions... I just included it and the compiler crashes and whenever I remove it, The compiler works.
OK, I figured it out by looking at the code.
I just forgot to include MYSQL_USE_YINLINE or E_CALLBACK_DATA
Re: [REL] MySQL Plugin (Now on github!) -
caoraivoso3 - 20.04.2015
well i have a bug to report, i use r39-2 and sometimes some weird shit goes like i crash(it is my client or intended by me to do it) and some variables are saved badly and i say badly because i am on x,y,z and it's saved on 1.23E10 0 0.35, or the money variable goes on rampage with positive or negative values.
It is quite annoying.
It is a bug discovered or something new?
well i use orm system if i didn't mention.