MySQL Error - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQL Error (
/showthread.php?tid=504275)
MySQL Error [Fixed] -
dillo1000 - 03.04.2014
Bit confused over this?
Код:
error 017: undefined symbol "database"
pawn Код:
stock DoesOrgExist(orgid)
{
format(str,sizeof(str),"SELECT * FROM `orgs` WHERE `Orgid` = %d LIMIT 1",orgid);
if(!db_query(DB: database, str))
{
mysql_free_result();
return 1;
}
return 0;
}
Re: MySQL Error - Emmet_ - 03.04.2014
You need to define "database" in your script (at the top).
Re: MySQL Error -
dillo1000 - 03.04.2014
Quote:
Originally Posted by Emmet_
You need to define "database" in your script (at the top).
|
I realised it was because I was using a_mysql, not mysql so
if(!db_query(DB: database, str))
changed to
if(!mysql_query(str))
Thanks anyway