mysql doesn't load
#1

pawn Код:
new query[ 500 ];
        new sql[ 300 ];
        new line[ 300 ];
        format( query, sizeof( query ), "SELECT * FROM namai" );
        mysql_query( query );
        mysql_store_result( );
        new
            HiD = 0,
            String[ 228 ];
        while( mysql_fetch_row( line ) )
        {
            mysql_get_field( "Namo_Id", sql );
            HiD = strval( sql );
            nInfo[ HiD ][ namoID ] = strval( sql );
            mysql_get_field( "Savininko_Id", sql );
            nInfo[ HiD ][ savininkoID ] = strval( sql );
HiD is still = 0 after this code, but it should be difrent, becoucse Namo_Id is not 0

Debug show me:
Quote:

[21:18:51] CMySQLHandler::FetchField("Namo_Id") -

[21:18:51] >> mysql_fetch_field_row( Connection handle: 1 )

Reply
#2

Connection Handle just refeers to the script number of the connection itself. (An ID). What MySQL plugin are you using?
Reply
#3

SA-MP MySQL plugin R5
Reply
#4

1. Why are you using such an outdated version?
2. Why is the query a 500 cells array when you're barely even using 32 cells.
3. Are you sure the DB field is not incorrectly set?
4. Are you sure that the actual line is not bigger than where you're storing it at?
5. Are the other fields loading correctly?
Reply
#5

lock the theme in datebase was "Namo_ID" and in code was "Namo_Id" silly me
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)