Little Help
#1

Hello everybody. I have problem when I type /oban everything is getting load except IP I don`t know why but only IP from user table won`t load. Here is query check please:
pawn Код:
SELECT * FROM `users` WHERE `UserName` = '%s' AND `IP` = '%s'
Reply
#2

pawn Код:
new IP[16];
GetPlayerIp(playerid, IP, 16);
pawn Код:
SELECT * FROM `users` WHERE `UserName` = '%s' AND `IP` = '%s', puser, IP);
Reply
#3

Quote:
Originally Posted by ManuelNeuer
Посмотреть сообщение
pawn Код:
new IP[16];
GetPlayerIp(playerid, IP, 16);
pawn Код:
SELECT * FROM `users` WHERE `UserName` = '%s' AND `IP` = '%s', puser, IP);
Hmm sorry it`s going with offline ban system. I want to get IP from mySQL table but everything get`s loaded except IP from Table I can`t use playerid becouse that player is not online.
Reply
#4

First, you need to check whether >> IP << is the correct spelling for the IP in the MYSQL Database.

If the table column name is not the right spelling then it will not load it.

Also, could you specify how you are loading them? what MYSQL plugin are you using and the version. Maybe include the lines this query is being run off.
Reply
#5

Quote:
Originally Posted by azzerking
Посмотреть сообщение
First, you need to check whether >> IP << is the correct spelling for the IP in the MYSQL Database.

If the table column name is not the right spelling then it will not load it.

Also, could you specify how you are loading them? what MYSQL plugin are you using and the version. Maybe include the lines this query is being run off.
Everything is checked and guess what everything is correct but still have same problem..
Reply
#6

Try something like this:

pawn Код:
format(query,sizeof(query), "SELECT `id`,`IP` FROM `accounts` WHERE `Username`='%s'", tmpName);
        mysql_function_query(lineserver, query, true, "banningipforplayer", "i", playerid);
Reply
#7

Can you list the the column name for IP, and tell us your mysql plugin.

and how are you extracting it from database?

for example using BlueG plugin R36, then using cache_get_field_content.

Are you sure that IP in your database is a Varchar of 15. and that the variable your loading it into is also 15 cells

pawn Код:
new ip[15];

// MYSQL QUERY HERE //
cache_get_field_content(i, "COLUMN_NAME_HERE", ip);
Is this how you are doing it?
Reply
#8

Quote:
Originally Posted by azzerking
Посмотреть сообщение
Can you list the the column name for IP, and tell us your mysql plugin.

and how are you extracting it from database?

for example using BlueG plugin R36, then using cache_get_field_content.

Are you sure that IP in your database is a Varchar of 15. and that the variable your loading it into is also 15 cells

pawn Код:
new ip[15];

// MYSQL QUERY HERE //
cache_get_field_content(i, "COLUMN_NAME_HERE", ip);
Is this how you are doing it?
Well I am using MySQL R7 version and First I am selecting everything from table users then I search for column which have name UserName and IP when I found these two then I insert into bans table banname and banip that`s how it`s works...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)