Field value from mysql
#2

PHP код:
static sql1[90];
format(sql1sizeof(sql1), "SELECT * FROM `users` WHERE `Name` = '%s'"inputtext);
mysql_query(sql1);
mysql_store_result();
if(
mysql_retrieve_row())
{
    new 
result[50];
    
mysql_fetch_field_row(result,"SQLID");
    
SendFormatMessage(playerid, -1"His name is: %s | His SQLID is %d"inputtextstrval(result));

Should work; sql1 was the actual query, not the rows stored. Although, if you are only getting the SQLID from that query, you should use mysql_fetch_int()
Reply


Messages In This Thread
Field value from mysql - by Larry123 - 02.12.2012, 10:23
Re: Field value from mysql - by JJones432 - 02.12.2012, 10:52

Forum Jump:


Users browsing this thread: 1 Guest(s)