Print the name from a field
#1

I have an row ( varchar type ) and I select it by ID. How can I print its string value?

pawn Код:
format(query,sizeof(query),"SELECT `Sender` FROM `Emails` WHERE `ID`=5 LIMIT 1");
Sender, in my table, for this query, has this value: "Jonathan".
How to get this name into a variable?
Reply
#2

Send that query, get it's result and use printf? You can always ******, it's not hard!
Reply
#3

pawn Код:
mysql_store_result();
Now how can I print the result?
Reply
#4

nobody?
Reply
#5

pawn Код:
new name[MAX_PLAYER_NAME];

//Query here
mysql_store_result();
mysql_get_field("Sender", name);
printf("Name: %s", name);
mysql_free_result();
Reply
#6

pawn Код:
mysql_fetch_row()
cache_get_row()
But you should use caching.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)