error 017: undefined symbol "mysql_query"! plz help
#1

Hey guys, I was making a MySQL reg/login system, cos I was bored on yini. But I got this error:

Код:
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\LOSSAN~1\GAMEMO~1\MySQL.pwn(59) : error 017: undefined symbol "mysql_query"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Here:

Код:
public OnPlayerConnect(playerid)
{
	new query[126], pName[MAX_PLAYER_NAME];
	
	GetPlayerName(playerid, pName, sizeof(pName));
	
	format(query, sizeof(query), "SELECT * FROM accounts WHERE name = '%s'", pName);
	mysql_query(query); /// THIS LINE HAS THE ERROR!
	mysql_store_result();
	return 1;
}
Please help me!
Reply
#2

are you already do this ?
pawn Код:
#include <a_mysql>
Reply
#3

SEARCH already! This has been asked literally thousands of times.
https://www.******.be/#hl=nl&safe=of...w=1280&bih=919
Reply
#4

I tried,

Код:
format(query, sizeof(query), "SELECT * FROM accounts WHERE name = '%s'", pName);
mysql_function_query(query);// but i still get an error here
I get an error there at mysql_function_query

Код:
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\LOSSAN~1\GAMEMO~1\MySQL.pwn(59) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#5

use
pawn Код:
mysql_query(query);
instead of
pawn Код:
mysql_function_query(query);
Reply
#6

It's not a matter of using mysql_function_query the same as mysql_query they are different functions.

This tut may help you understand better https://sampforum.blast.hk/showthread.php?tid=337810

Quote:
Originally Posted by Kiyozi_Mu
Посмотреть сообщение
use
pawn Код:
mysql_query(query);
instead of
pawn Код:
mysql_function_query(query);
Did you even read the thread title?
Reply
#7

Quote:
Originally Posted by iggy1
Посмотреть сообщение
It's not a matter of using mysql_function_query the same as mysql_query they are different functions.

This tut may help you understand better https://sampforum.blast.hk/showthread.php?tid=337810



Did you even read the thread title?
It still doesn't make any sense?

Код:
C:\DOCUME~1\DANNY~1.YOU\MYDOCU~1\LOSSAN~1\GAMEMO~1\MySQL.pwn(66) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Код:
	mysql_function_query("SELECT * FROM accounts WHERE name = '%s'", pName);
Reply
#8

You will either need to learn to use threaded queries (from the link i posted), or use an older plugin version. It's not a matter of swapping code here and there, it's a completely different system and does not work at all like the old version.

As for the new warning, you have to pass a database handle as the first argument. The handle is returned by mysql_connect.
Reply
#9

Can someone explain to me how to use MySQL query function
Reply
#10

MySQL Query Function: https://sampwiki.blast.hk/wiki/MySQL#mysql_query
read this thread first https://sampforum.blast.hk/showthread.php?tid=56564 before you start scripting MySQL
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)