Please help me (mysql)
#1

When i press F5 I get this error

pawn Код:
error 017: undefined symbol "cache_get_field_content_string"
The line is:
pawn Код:
PlayerInfo[playerid][pEmail] = cache_get_field_content_string(0, " ");//
Reply
#2

What MySQL version do you have? I believe that function native is only available on the Threaded Version of MySQL which is R7.
Reply
#3

https://github.com/pBlueG/SA-MP-MySQL/releases http://prntscr.com/6sf36p
Reply
#4

Hello!

You have to write it so:
PHP код:
cache_get_field_content(0,"pEmail",PlayerInfo[playerid][pEmail],connectionhandle,30);
// 0 = row
// pEmail = name
// PlayerInfo[playerid][pEmail] = your enum variable
// connectionhandle = The Connection handle (MySQL)
// 30 = length of pEmail 
Mencent
Reply
#5

https://sampwiki.blast.hk/wiki/MySQL/R33..._field_content

Modify it according to the names/lenght you're using.
Reply
#6

Quote:
Originally Posted by Mencent
Посмотреть сообщение
Hello!

You have to write it so:
PHP код:
cache_get_field_content(0,"pEmail",PlayerInfo[playerid][pEmail],connectionhandle,30);
// 0 = row
// pEmail = name
// PlayerInfo[playerid][pEmail] = your enum variable
// connectionhandle = The Connection handle (MySQL)
// 30 = length of pEmail 
Mencent
Thanks I fixed this. in my mysql_log onplayerdissconnect i found this

Код:
[16:01:18] [DEBUG] mysql_format - connection: 1, len: 1000, format: "UPDATE `players` SET `Pari`=%d, `Admin`=%d, `Spawn`=%d, `Pol`=%d, `Drzava`=%d, `Godini`=%d, `Email`=%s, `Skin`=%d, `GM`=%d, `Lev..."
[16:01:18] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `players` SET `Pari`=10000, `Admin`=0, `Spawn`=0, `Pol`=0", callback: "(null)", format: "(null)"
[16:01:18] [DEBUG] CMySQLQuery::Execute[] - starting query execution
[16:01:18] [ERROR] CMySQLQuery::Execute[] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' `Skin`=7, `GM`=0, `Level`=0, `Exp`=0, `Rep`=0, `Kukja`=0, `Rent`=0, `Stan`=0, `' at line 1
[16:01:18] [DEBUG] CMySQLQuery::Execute[] - error will be triggered in OnQueryError
Reply
#7

Whenever you pass a string in mysql_format, use ' ' around %s and %e. Also it's recommended to use %e instead to escape the string directly.

Change:
pawn Код:
... `Email`=%s ...
to:
pawn Код:
... `Email`='%e' ...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)