Getting string from SQL
#10

Quote:
Originally Posted by arakuta
Посмотреть сообщение
How are u perfoming the queries and loading the results? I mean, you should have something like this:

PHP код:
mysql_function_query(handle,"SELECT nickname FROM users WHERE userid=10",true,"MyResponse","d",playerid); 
PHP код:
// MyResponse
cache_get_data(rows,fields);
if(
rows)
{
    
// the 0 means the first row found.
    // found amount is the variable rows
    // for more rows result you should use a loop from 0 to rows - 1
    
cache_get_field_content(0,"nickname",string,handle,64);
    
// string now has the value of field nickname from userid 10
}
else
{
    
// found nothing  bla bla

Its a quite long OnAccountLoad functions.

Loading part for the NickName
PHP код:
cache_get_field_content(51"NickName"AccInfo[playerid][NickName], mysql64); 
Now if I just format string inside the OnAccountLoad it will properly print the result, I mean it will print their NickName but once I store it inside AccInfo[playerid][NickName] it will be set as NULL
Reply


Messages In This Thread
Getting string from SQL - by TwinkiDaBoss - 09.12.2015, 18:24
Re: Getting string from SQL - by Vince - 09.12.2015, 18:47
Re: Getting string from SQL - by TwinkiDaBoss - 09.12.2015, 18:52
Re: Getting string from SQL - by TwinkiDaBoss - 09.12.2015, 20:37
Re: Getting string from SQL - by AmigaBlizzard - 09.12.2015, 20:57
Re: Getting string from SQL - by SickAttack - 09.12.2015, 21:07
Re: Getting string from SQL - by TwinkiDaBoss - 10.12.2015, 16:16
Re: Getting string from SQL - by TwinkiDaBoss - 10.12.2015, 23:17
Re: Getting string from SQL - by arakuta - 10.12.2015, 23:32
Re: Getting string from SQL - by TwinkiDaBoss - 10.12.2015, 23:36

Forum Jump:


Users browsing this thread: 4 Guest(s)