19.03.2014, 16:59
- easier to iterate
- most efficient way to access them within the plugin
- consistent with the data retrieval (row indices also start at 0, see previous point why)
mysql_tquery(DB, "SELECT..........", "ExampleQuery", "s", "example");
forward ExampleQuery(p_name[]);
public ExampleQuery(p_name[])
{
printf("%s", p_name);
// prints 'example'
}
[16:35:06] [debug] Server crashed due to an unknown error [16:35:06] [debug] Native backtrace: [16:35:06] [debug] #0 004c531b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so [16:35:06] [debug] #1 004bf7c2 in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so [16:35:06] [debug] #2 004c03ac in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so [16:35:06] [debug] #3 004c0856 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so [16:35:06] [debug] #4 004c4f6c in ?? () from plugins/crashdetect.so [16:35:06] [debug] #5 00e4a410 in ?? () [16:35:06] [debug] #6 003177d6 in ?? () from /lib/libc.so.6 [16:35:06] [debug] #7 00b81be4 in _ZN11CMySQLQuery11StoreResultEP8st_mysqlP12st_mysql_res () from plugins/mysql_static.so [16:35:06] [debug] #8 00b81fe7 in _ZN11CMySQLQuery7ExecuteEP8st_mysql () from plugins/mysql_static.so [16:35:06] [debug] #9 00b79384 in _ZN16CMySQLConnection14ProcessQueriesEv () from plugins/mysql_static.so [16:35:06] [debug] #10 00b79c87 in _ZN5boost6detail11thread_dataINS_3_bi6bind_tIvNS_4_mfi3mf0Iv16CMySQLConnectionEENS2_5list1INS2_5valueIPS6_EEEEEEE3runEv () from plugins/mysql_static.so [16:35:06] [debug] #11 00c24b78 in ?? () from plugins/mysql_static.so [16:35:06] [debug] #12 009dfb39 in ?? () from /lib/libpthread.so.0 [16:35:06] [debug] #13 002c2d6e in clone () from /lib/libc.so.6
Код:
[16:35:06] [debug] Server crashed due to an unknown error [16:35:06] [debug] Native backtrace: [16:35:06] [debug] #0 004c531b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so [16:35:06] [debug] #1 004bf7c2 in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so [16:35:06] [debug] #2 004c03ac in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so [16:35:06] [debug] #3 004c0856 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so [16:35:06] [debug] #4 004c4f6c in ?? () from plugins/crashdetect.so [16:35:06] [debug] #5 00e4a410 in ?? () [16:35:06] [debug] #6 003177d6 in ?? () from /lib/libc.so.6 [16:35:06] [debug] #7 00b81be4 in _ZN11CMySQLQuery11StoreResultEP8st_mysqlP12st_mysql_res () from plugins/mysql_static.so [16:35:06] [debug] #8 00b81fe7 in _ZN11CMySQLQuery7ExecuteEP8st_mysql () from plugins/mysql_static.so [16:35:06] [debug] #9 00b79384 in _ZN16CMySQLConnection14ProcessQueriesEv () from plugins/mysql_static.so [16:35:06] [debug] #10 00b79c87 in _ZN5boost6detail11thread_dataINS_3_bi6bind_tIvNS_4_mfi3mf0Iv16CMySQLConnectionEENS2_5list1INS2_5valueIPS6_EEEEEEE3runEv () from plugins/mysql_static.so [16:35:06] [debug] #11 00c24b78 in ?? () from plugins/mysql_static.so [16:35:06] [debug] #12 009dfb39 in ?? () from /lib/libpthread.so.0 [16:35:06] [debug] #13 002c2d6e in clone () from /lib/libc.so.6 |
Код:
[16:35:06] [debug] Server crashed due to an unknown error [16:35:06] [debug] Native backtrace: [16:35:06] [debug] #0 004c531b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so [16:35:06] [debug] #1 004bf7c2 in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so [16:35:06] [debug] #2 004c03ac in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so [16:35:06] [debug] #3 004c0856 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so [16:35:06] [debug] #4 004c4f6c in ?? () from plugins/crashdetect.so [16:35:06] [debug] #5 00e4a410 in ?? () [16:35:06] [debug] #6 003177d6 in ?? () from /lib/libc.so.6 [16:35:06] [debug] #7 00b81be4 in _ZN11CMySQLQuery11StoreResultEP8st_mysqlP12st_mysql_res () from plugins/mysql_static.so [16:35:06] [debug] #8 00b81fe7 in _ZN11CMySQLQuery7ExecuteEP8st_mysql () from plugins/mysql_static.so [16:35:06] [debug] #9 00b79384 in _ZN16CMySQLConnection14ProcessQueriesEv () from plugins/mysql_static.so [16:35:06] [debug] #10 00b79c87 in _ZN5boost6detail11thread_dataINS_3_bi6bind_tIvNS_4_mfi3mf0Iv16CMySQLConnectionEENS2_5list1INS2_5valueIPS6_EEEEEEE3runEv () from plugins/mysql_static.so [16:35:06] [debug] #11 00c24b78 in ?? () from plugins/mysql_static.so [16:35:06] [debug] #12 009dfb39 in ?? () from /lib/libpthread.so.0 [16:35:06] [debug] #13 002c2d6e in clone () from /lib/libc.so.6 |
Speaking of parallel queries. Could you give me a scenario where they might be useful?
|
public OnGameModeInit { [...] mysql_pquery(g_SQL, "SELECT * FROM vehicles", "OnVehiclesLoad"); mysql_pquery(g_SQL, "SELECT * FROM houses", "OnHousesLoad"); //other systems [...] return 1; }
[13:36:01] Loading plugin: mysql.so [13:36:01] Failed (plugins/mysql.so: symbol __cxa_pure_virtual, version libmysqlclient_16 not defined in file libmysqlclient_r.so.16 with link time reference)
mysql_ping()
I haven't coded sa-mp awhile, is there a replacement for
pawn Код:
Edit nevermind, i'm just gonna have to redo my whole script to use the latest plugin, shit has change a lot over the years |