Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
mysql module new problem in 0.1.0
#1
Hi.
The problem in version 0.1.0
Return bad strings. Must return "id" "enter" "pass". Return (example): 50, 48, 46 ... There are no such values in the database in this order and quantity at all.
In the old version of the module for dev 8 everything works fine.

local query = mysql_query(Server_handler, "SELECT * FROM `player_cred` WHERE `player_name` = '"+getPlayerName(pid)+"' "); 
local row = mysql_fetch_row(query);

foreach(b in row)
print(b);
Reply
#2
I do not quite understand what the problem is.

local query = mysql_query(Server_handler, "SELECT * FROM `player_cred` WHERE `player_name` = '"+getPlayerName(pid)+"' ");
local row = mysql_fetch_assoc(query);
print(row["id"]);
print(row["enter"]);
print(row["pass"]);
Discord: I'm not a spy...#9943.
GG: 60474243.

[Image: OsmithREV.gif]
[Image: 76561198181768479.png]
Reply
#3
I also tried using mysql_fetch_assoc. Same.
The problem is that the variable "string" will contain incomprehensible data. I do not know where they come from. Just a bunch of int values.
In this case, the "insert" work normal, and "select" returns bad data.
And in the old version of the module for dev 8 everything worked fine
Good. The problem is solved in part.
Mysql_fetch_assoc is working fine. The first time I made a mistake with the headlines.
But mysql_fetch_row still does not work, as in the old version.

I will use _assoc
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  MySql modul Baster 3 3,514 31.10.2016, 11:48
Last Post: Baster
  Database and other Question (new team) Kemi 18 12,198 09.02.2016, 22:23
Last Post: Kemi
  Timer problem... Jayson 6 4,500 15.10.2015, 22:56
Last Post: Jayson

Forum Jump:


Users browsing this thread: 1 Guest(s)