04.04.2011, 17:20
[Plugin] [REL] MySQL Plugin (Now on github!)
04.04.2011, 18:44
PHP код:
forward checkChat();
public checkChat()
{
new query[256];
format(query, 256, "SELECT * FROM `" TABLE_PREF "chat` WHERE `id` > %d ORDER BY `id` ASC", lastChatId);
mysql_query(query);
mysql_store_result();
while(mysql_next_row())
{
new d[32];
mysql_get_field("id", d);
print(d);
mysql_get_field("name", d);
print(d);
mysql_get_field("message", d);
print(d);
}
mysql_free_result();
}
05.04.2011, 03:58
@Romanius: Perform the query in phpMyAdmin and see if you get any results (update the criteria where necessary).
05.04.2011, 08:32
this query from my php script and its work perfect.
05.04.2011, 08:38
What's returned when you execute the code? Check your error log / enable debugging from the plugin.
05.04.2011, 12:40
it crashes server. print only this:
then server shut down
PHP код:
mysql_get_field("id", d);
print(d);
05.04.2011, 12:45
pawn Код:
forward checkChat();
public checkChat()
{
new query[256];
format(query, 256, "SELECT * FROM `" TABLE_PREF "chat` WHERE `id` > %d ORDER BY `id` ASC", lastChatId);
mysql_query(query);
mysql_store_result();
while(mysql_next_row())
{
new d[32], e[32], f[32];
mysql_get_field("id", d);
print(d);
mysql_get_field("name", e);
print(e);
mysql_get_field("message", f);
print(f);
}
mysql_free_result();
}
05.04.2011, 13:08
Try to use
and try to use sscanf.
Код:
while(mysql_fetch_row())
05.04.2011, 17:40
Quote:
and try to use sscanf. |
with sscanf variant doesn't suit me
05.04.2011, 19:05
(
Последний раз редактировалось zerocoolos; 30.04.2011 в 17:14.
)
never mind...
05.04.2011, 19:07
my mistake! i have newer libmysql.dll! all works fine with "old" .dll
06.04.2011, 12:47
hello... i wanna use this plugin on Debian 6, what should i do for use it on Debian 6? cand someone help me?
As it is now, it doesn't work..
As it is now, it doesn't work..
08.04.2011, 20:17
Hey guys!
I have an error:
My host is using linux and I have put the needed files and I have add at plugins in server.cfg. And my host has putted the file that is needed. But it doesn't work. Any ideas how to fix it?
I have an error:
Код:
Failed (libmysqlclient_r.so.15: cannot open shared object file: No such file or directory)
09.04.2011, 10:08
Help,i need to save and load 111 items ,and sscanf didn't suport 111 parameters,how can i do to save and load it?Just a small example
PS:I use GF..
PS:I use GF..
09.04.2011, 11:49
Simply don't use sscanf? mysql_retrieve_row + mysql_fetch_field_row would do the job.
13.04.2011, 01:49
mysql_affected_rows() is buggy. Even when rows get inserted there are times where it will return an incorrect value.
13.04.2011, 09:39
I have a problem.
Func MySQL_GetInt return "-1" and it should return "pieniadze" (520000$)
How to fix?
pawn Код:
CMD:mystat(playerid, params[])
{
new StrSTAT[30];
format(StrSTAT, sizeof(StrSTAT), "cash: %d, exp: %d", MySQL_GetInt(playerid, "pieniadze"), MySQL_GetInt(playerid, "exp"));
SendClientMessage(playerid, -1, StrSTAT);
return 1;
}
MySQL_GetInt(playerid, fieldname[])
{
new ret_field;
mysql_query_format("SELECT `%s` FROM `KontaGraczy` WHERE 'login' = '%s'", fieldname, PlayerName(playerid));
mysql_store_result();
ret_field = mysql_fetch_int();
mysql_free_result();
return ret_field;
}
How to fix?
13.04.2011, 16:53
what is the limit of mysql?
13.04.2011, 17:37
Why limit ?
14.04.2011, 08:45
Quote:
I have a problem.
pawn Код:
How to fix? |
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)