mysql doesn't load - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: mysql doesn't load (
/showthread.php?tid=497202)
mysql doesn't load -
ancezas - 25.02.2014
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 )
|
Respuesta: mysql doesn't load -
CuervO - 25.02.2014
Connection Handle just refeers to the script number of the connection itself. (An ID). What MySQL plugin are you using?
Re: mysql doesn't load -
ancezas - 25.02.2014
SA-MP MySQL plugin R5
Respuesta: mysql doesn't load -
CuervO - 25.02.2014
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?
Re: mysql doesn't load -
ancezas - 25.02.2014
lock the theme in datebase was "Namo_ID" and in code was "Namo_Id" silly me