print is empty
#1

Hey i have an issue trying to print variable from Mysql DataBase when i do this:
Код:
cache_get_value(0, "isidarbino", pInfo[playerid][workingSince]);
	printf("%s", pInfo[playerid][workingSince]);
i get print statmen empty any idea why and in DataBase i have
?
Reply
#2

What's the utility to print a variable from the database when it's stored already in your pInfo enum?

I guess "workingSince" is stored as column in your players table in database, so why retrieving it with a query? Just remove the cache_get_value part and print from pInfo enum.

pawn Код:
printf("%s", pInfo[playerid][workingSince]);
Reply
#3

Quote:
Originally Posted by KinderClans
Посмотреть сообщение
What's the utility to print a variable from the database when it's stored already in your pInfo enum?

I guess "workingSince" is stored as column in your players table in database, so why retrieving it with a query? Just remove the cache_get_value part and print from pInfo enum.

pawn Код:
printf("%s", pInfo[playerid][workingSince]);
Its stored in row:

but then if i remove
Код:
cache_get_value(0, "isidarbino", pInfo[playerid][workingSince]);
part it doesnt load from DB, any other ideas?
Reply
#4

Код:
[09/21/18 16:49:19] [DEBUG] cache_get_value_name(0, "isidarbino", 0xF4E1FBC4, 1)
[09/21/18 16:49:19] [DEBUG] cache_get_value_name: assigned value: '2018-08-09'
[09/21/18 16:49:19] [DEBUG] cache_get_value_name: return value: '1'
this is mysql Debug log
Reply
#5

Try use cache_get_value_name.

cache_get_value_name(0, "isidarbino", pInfo[playerid][workingSince], 31);
Reply
#6

it doesnt write to the string
Reply
#7

the string is allways empty
Reply
#8

Quote:
Originally Posted by kingmk
Посмотреть сообщение
Try use cache_get_value_name.

cache_get_value_name(0, "isidarbino", pInfo[playerid][workingSince], 31);
nevermind your sullution works thans +rep dood
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)