SA-MP Forums Archive
Бан (mysql) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Русский/Russian (https://sampforum.blast.hk/forumdisplay.php?fid=32)
+---- Thread: Бан (mysql) (/showthread.php?tid=423354)

Pages: 1 2


Re: Бан (mysql) - Stepashka - 19.03.2013

Ted67, ты данные неправильно получаешь.


Re: Бан (mysql) - Ted67 - 19.03.2013

Quote:
Originally Posted by Frapsy
Посмотреть сообщение
PHP код:
WHERE `Name` = '' 
Вот тут внимательнее
Изменил на BanDate='12312322' - самп падает (Не отвечает).

Quote:
Originally Posted by Stepashka
Посмотреть сообщение
Ted67, ты данные неправильно получаешь.
Хм.. Сам запрос неверный или ?:

pawn Код:
new time[32];
        cache_get_row(0, 34, time);
        format(SQL,64,"Result: %s",time),Message(p,-1,SQL);



Re: Бан (mysql) - Stepashka - 19.03.2013

Quote:
Originally Posted by Ted67
Посмотреть сообщение
Хм.. Сам запрос неверный или ?:

pawn Код:
new time[32];
        cache_get_row(0, 34, time);
        format(SQL,64,"Result: %s",time),Message(p,-1,SQL);
второе.


Re: Бан (mysql) - Ted67 - 19.03.2013

Quote:
Originally Posted by Stepashka
Посмотреть сообщение
второе.
PHP код:
mysql_fetch_row(time); 
Вот так в mysql логе:

Quote:

>> cache_get_data( Connection handle: 1 )
>> mysql_fetch_row_format( Connection handle: 1 )
CMySQLHandler::FetchRow() - You cannot call this function now. (Reason: Empty Result)

Пустой результат.. вроде бы запрос верный, хм..


Re: Бан (mysql) - Stepashka - 19.03.2013

Так тяжело внимательно изучить документацию?
pawn Код:
public MySQLExample() {
    mysql_store_result();//Вот эта функция извлекает данные из результата
    if (mysql_num_rows() > 0) {
        new result[128], time;
        while (mysql_fetch_row_format(result, "|")) {
            sscanf(result, "p<|>i", time);
            //в time будет необходимое тебе значение
        }
    }
    mysql_free_result(dbHandler);
}



Re: Бан (mysql) - Ted67 - 20.03.2013

Quote:
Originally Posted by Stepashka
Посмотреть сообщение
Так тяжело внимательно изучить документацию?
pawn Код:
public MySQLExample() {
    mysql_store_result();//Вот эта функция извлекает данные из результата
    if (mysql_num_rows() > 0) {
        new result[128], time;
        while (mysql_fetch_row_format(result, "|")) {
            sscanf(result, "p<|>i", time);
           
        }
    }
    mysql_free_result(dbHandler);
}
Хм...
Quote:

ProcessQueryThread(OnTest) - Data caching enabled.
CMySQLHandler::StoreResult() - Result was stored.
CMySQLHandler::FreeResult() - Result was successfully free'd.
CMySQLHandler::ProcessQueryThread() - Data is getting passed to ->ProcessTick()
OnTest(i) - Threaded function called.
>> mysql_store_result( Connection handle: 1 )
CMySQLHandler::StoreResult() - No data to store.
>> mysql_num_rows( Connection handle: 1 )
CMySQLHandler::NumRows() - You cannot call this function now. (Reason: Dead Connection)
>> mysql_free_result( Connection handle: 1 )
CMySQLHandler::FreeResult() - The result is already empty.
ProcessTick() - The cache has been cleared.