MySQL data taking problems.
#1

Hi, i have one problem. Can you help me?
Thanks.

I have one command: /newspaper
i need to take all data from my mysql table "Newspaper" from row "Text"

COMMAND:newspaper(playerid,params[])
{
new Query[200];
new result[50];
format(Query, sizeof(Query), "SELECT * FROM `Newspaper`");
mysql_store_result();
mysql_fetch_field_row(result,"Text");
SendClientMessage(playerid, COLOR_BALTA, result);
mysql_free_result();

return 1;
}


What i do bad? It not works, it shows only blank text. Can you help me, or can you do that command, who takes and shows all data from "Text" row? Thank you,

Vidma.
Reply
#2

pawn Code:
COMMAND:newspaper( playerid, params[ ] )
{
    new
        row[ 128 ];
       
    mysql_query ( "SELECT * FROM `Newspaper`" );
    mysql_store_result ( );
    mysql_fetch_row    ( row );
   
    SendClientMessage( playerid, -1, row );
   
    mysql_free_result ( );
}
Bandyk..
Reply
#3

Vistiek neveikia. Dabar nieko nerašo.
Anyway, not works.
Reply
#4

Anyone can help to me?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)