mysql does not load string (no errors)
#1

PHP код:
mysql_format(sqlquerysizeof query"SELECT `chat_color` FROM `user_features` WHERE `id` = %d"DB[playerid][ID]);
    
result mysql_query(sqlquery);
    
printf(query);
    new 
getstr2[15];
    
cache_get_field_content(0"chat_color"getstr2);
    
format(DB[playerid][ChatColor], 15getstr2);
    
Message(playeridTYPE_INFOgetstr2);
    
Message(playeridTYPE_INFODB[playerid][ChatColor]);
    
cache_delete(result); 
no errors at all,
Batch file (printf), all seem to be good:
PHP код:
SELECT `chat_colorFROM `user_featuresWHERE `id` = 
but getstr2 stays blank for some reason.
Reply
#2

Show us your Mysql log
Reply
#3

Try this:
PHP код:
cache_get_field_content(0"chat_color"getstr2sql15); 
Reply
#4

Quote:
Originally Posted by saffierr
Посмотреть сообщение
Try this:
PHP код:
cache_get_field_content(0"chat_color"getstr2sql15); 
Gives me errors ^


Quote:
Originally Posted by HoussemGaming
Посмотреть сообщение
Show us your Mysql log
I have no mysql logs over that, it does not give me any error.
Reply
#5

First of all, you're using mysql_query, if you intend to halt the script until the query finishes, then you used the right function, if not, then use tquery or pquery.

Its differences are explained here.
http://forum.sa-mp.com/showpost.php?...postcount=5021

Second, try to launch the query through the cli or a MySQL administration software you have on (most have phpMyAdmin)
If it doesn't return anything, then either your query is not correct or you don't have such a record.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)