mysq | What's the problem ?
#1

hello.

what it's problem in this code:

pawn Код:
stock GetServerInt(var[])
{
    new query[256],vreturn[56];
    format(query,256,"SELECT '%s' FROM 'server' WHERE Checked=50",var);
    mysql_query(query);
    mysql_store_result();
    mysql_fetch_row_format(vreturn,"|");
    return strval(vreturn);
}
It does not return the correct value.

please help !!
Reply
#2

first off, 'server'?

secondly, you are selecting the row in | format so the real return will look like

Var|Var|Var|Var

then you are returning strval("Var|Var|Var|Var");

you get where im going?
Reply
#3

Sorry man but I did not understand that.

You can try to explain more in detail?
Or just bring me Revised Code and from the solution I would realize. ?
Reply
#4

pawn Код:
stock GetServerInt(var[])
{
    new query[256],vreturn[56];
    format(query,256,"SELECT FROM 'server' WHERE `name` = '%s');
    mysql_query(query);
    mysql_store_result();
    mysql_fetch_row_format(vreturn,"
|");
    return strval(vreturn);
}
?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)