Alright. I used hawks code instead and it works now. Now ive been looking here
http://www.amxmodx.org/funcwiki.php?go=func&id=1105 at the SQLReadResult, and i get it working, now i just dont know how to get out the info.
PHP Code:
// run a random query
new Handle:Query = SQL_PrepareQuery(SqlConnection,"SELECT * FROM login")
// run the query
if(!SQL_Execute(Query))
{
// if there were any problems
SQL_QueryError(Query,g_Error,511)
set_fail_state(g_Error)
}
// checks to make sure there's more results
// notice that it starts at the first row, rather than null
new Data
while(SQL_MoreResults(Query))
{
// columns start at 0
Data = SQL_ReadResult(Query,1)
server_print("Found data: %d",Data)
SQL_NextRow(Query)
}
Example: I have a table named login and i want to get out the info in the second column called nick and i want to store that info in a string. How the hell do i do that?