- #1
签到随机功能插件,下载覆盖后,不管是配合原来的金钱插件还是金钱plus,都签到失败
签到随机功能插件,下载覆盖后,不管是配合原来的金钱插件还是金钱plus,都签到失败
[2024-11-06 12:24:47] flarum.ERROR: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '. and checkin_time > '2024-11-04 00:00:00' and checkin_time < '2024-11-05 23:59:' at line 1 in /www/wwwroot/test/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:82
Stack trace:
#0 /www/wwwroot/test/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(82): PDO->prepare()
#1 /www/wwwroot/test/vendor/illuminate/database/Connection.php(368): Doctrine\DBAL\Driver\PDOConnection->prepare()
#2 /www/wwwroot/test/vendor/illuminate/database/Connection.php(705): Illuminate\Database\Connection->Illuminate\Database\{closure}()
#3 /www/wwwroot/test/vendor/illuminate/database/Connection.php(672): Illuminate\Database\Connection->runQueryCallback()
#4 /www/wwwroot/test/vendor/illuminate/database/Connection.php(376): Illuminate\Database\Connection->run()
#5 /www/wwwroot/test/vendor/illuminate/database/Connection.php(332): Illuminate\Database\Connection->select()
#6 /www/wwwroot/test/vendor/gtdxyz/flarum-ext-checkin/src/Listeners/CheckinListener.php(109): Illuminate\Database\Connection->selectOne()
#7 /www/wwwroot/test/vendor/illuminate/events/Dispatcher.php(424): Gtdxyz\Checkin\Listeners\CheckinListener->checkinSaving()
#8 /www/wwwroot/test/vendor/illuminate/events/Dispatcher.php(249): Illuminate\Events\Dispatcher->Illuminate\Events\{closure}()
#9 /www/wwwroot/test/vendor/flarum/core/src/User/Command/EditUserHandler.php(138): Illuminate\Events\Dispatcher->dispatch()
#10 /www/wwwroot/test/vendor/illuminate/bus/Dispatcher.php(122): Flarum\User\Command\EditUserHandler->handle()
#11 /www/wwwroot/test/vendor/illuminate/pipeline/Pipeline.php(128): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}()
#12 /www/wwwroot/test/vendor/illuminate/pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#13 /www/wwwroot/test/vendor/illuminate/bus/Dispatcher.php(132): Illuminate\Pipeline\Pipeline->then()
#14 /www/wwwroot/test/vendor/illuminate/bus/Dispatcher.php(78): Illuminate\Bus\Dispatcher->dispatchNow()
#15 /www/wwwroot/test/vendor/flarum/core/src/Api/Controller/UpdateUserController.php(71): Illuminate\Bus\Dispatcher->dispatch()
#16 /www/wwwroot/test/vendor/flarum/core/src/Api/Controller/AbstractSerializeController.php(116): Flarum\Api\Controller\UpdateUserController->data()
#17 /www/wwwroot/test/vendor/flarum/core/src/Http/RouteHandlerFactory.php(41): Flarum\Api\Controller\AbstractSerializeController->handle()
#18 /www/wwwroot/test/vendor/flarum/core/src/Http/Middleware/ExecuteRoute.php(27): Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}()
#19 /www/wwwroot/test/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ExecuteRoute->process()
#20 /www/wwwroot/test/vendor/flarum/core/src/Api/Middleware/ThrottleApi.php(33): Laminas\Stratigility\Next->handle()
#21 /www/wwwroot/test/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Api\Middleware\ThrottleApi->process()
#22 /www/wwwroot/test/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php(44): Laminas\Stratigility\Next->handle()
#23 /www/wwwroot/test/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\CheckCsrfToken->process()
#24 /www/wwwroot/test/vendor/flarum/core/src/Http/Middleware/ResolveRoute.php(69): Laminas\Stratigility\Next->handle()
#25 /www/wwwroot/test/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ResolveRoute->process()
#26 /www/wwwroot/test/vendor/flarum/core/src/Http/Middleware/SetLocale.php(51): Laminas\Stratigility\Next->handle()
#27 /www/wwwroot/test/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\SetLocale->process()
#28 /www/wwwroot/test/vendor/flarum/core/src/Http/Middleware/AuthenticateWithHeader.php(58): Laminas\Stratigility\Next->handle()
#29 /www/wwwroot/test/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\AuthenticateWithHeader->process()
#30 /www/wwwroot/test/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(31): Laminas\Stratigility\Next->handle()
#31 /www/wwwroot/test/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\AuthenticateWithSession->process()
#32 /www/wwwroot/test/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(52): Laminas\Stratigility\Next->handle()
#33 /www/wwwroot/test/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\RememberFromCookie->process()
后面还有,你看上面有没有?
没有的话得传到网盘了,字数限制
xiaobai 跟我 前天的错误一样,我给你改下代码
src\Listeners\CheckinListener.php 第102行附近,将下面替换进去
if ($constant_force) {
$sql = "select user_id, checkin_time, check_days from";
$sql .= " (select user_id, checkin_time, constant, @pre_check := IF(constant, @pre_check+1, 0) as 'check_days'";
$sql .= " from user_checkin_history, (select @pre_check :=0) init where user_id={$userID}";
$sql .= " and checkin_time > '{$start_date}' and checkin_time < '{$end_date}'";
$sql .= " ) as tmp ";
$sql .= "order by checkin_time desc limit 1";
$data = $this->db->selectOne($sql);
$constant_count = $data ? $data->check_days : 0;
} else {
$constant_count = UserCheckinHistory::where('user_id', $userID)
->where('event_id', 0)
->where('constant', 1)
->where('checkin_time', '>', $start_date)
->where('checkin_time', '<', $end_date)
->orderBy('checkin_time', 'desc')
->count();
}
alay 替换进去了,还是不行
[2024-11-06 14:22:36] flarum.ERROR: PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'last_checkin_time' in 'field list' in /www/wwwroot/test/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:82
Stack trace:
#0 /www/wwwroot/test/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(82): PDO->prepare()
#1 /www/wwwroot/test/vendor/illuminate/database/Connection.php(522): Doctrine\DBAL\Driver\PDOConnection->prepare()
#2 /www/wwwroot/test/vendor/illuminate/database/Connection.php(705): Illuminate\Database\Connection->Illuminate\Database\{closure}()
#3 /www/wwwroot/test/vendor/illuminate/database/Connection.php(672): Illuminate\Database\Connection->runQueryCallback()
#4 /www/wwwroot/test/vendor/illuminate/database/Connection.php(533): Illuminate\Database\Connection->run()
#5 /www/wwwroot/test/vendor/illuminate/database/Connection.php(466): Illuminate\Database\Connection->affectingStatement()
#6 /www/wwwroot/test/vendor/illuminate/database/Query/Builder.php(3063): Illuminate\Database\Connection->update()
#7 /www/wwwroot/test/vendor/illuminate/database/Eloquent/Builder.php(921): Illuminate\Database\Query\Builder->update()
#8 /www/wwwroot/test/vendor/illuminate/database/Eloquent/Model.php(1072): Illuminate\Database\Eloquent\Builder->update()
#9 /www/wwwroot/test/vendor/illuminate/database/Eloquent/Model.php(987): Illuminate\Database\Eloquent\Model->performUpdate()
#10 /www/wwwroot/test/vendor/gtdxyz/flarum-ext-checkin/src/Listeners/CheckinUpdateMoneyListener.php(36): Illuminate\Database\Eloquent\Model->save()