hi i have db and table with the name "tbname" and column "name"
when i do this
PHP Code:
public client_disconnect(id)
SQL_ThreadQuery(g_SqlTuple,"SelectHandle","SELECT name FROM tbname WHERE id='1'")
public SelectHandle(FailState,Handle:Query,Error[],Errcode,Data[],DataSize)
{
if(FailState == TQUERY_CONNECT_FAILED)
return set_fail_state("Could not connect to SQL database.")
else if(FailState == TQUERY_QUERY_FAILED)
return set_fail_state("Query failed.")
if(Errcode)
return log_amx("Error on query: %s",Error)
new DataNum
while(SQL_MoreResults(Query))
{
DataNum = SQL_ReadResult(Query,0)
server_cmd("amx_say your name is %d ",DataNum)
SQL_NextRow(Query)
}
return PLUGIN_CONTINUE
}
i get like this : your name is 0
but i have the name "loler"
and i want that print this "Your name is loler"