News:

Help keep this project going by donating or buying adseller pro

Main Menu
Coinbase

Database error after upgrading to Mysql 5.7

Started by melktert, April 06, 2019, 10:51:18 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

melktert

Hi

I'm getting the following errors in my log since upgrading to Mysql 5.7:

Database Error: Out of range value for column 'HITS' at row 1Apply
Filter: Only show the errors from this file File: /home/brokenwiener/public_html/forums/Sources/LoadAds.php
Line: 298


Forum displays this at the bottom:
Out of range value for column 'HITS' at row 1
File: /home/brokenwiener/public_html/forums/Sources/LoadAds.php
Line: 298

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.15, while your database is at version 2.0.4. The above error might possibly go away if you execute the latest version of upgrade.php.


Error 298 refers to:
$smcFunc['db_query']('',"UPDATE {db_prefix}ads SET hits = hits+1 WHERE ADS_ID = $id"); in LoadAds.php

Version Information:
Forum version: SMF 2.0.15 (more detailed)
Current SMF version: SMF 2.0.15
GD version: bundled (2.1.0 compatible)
Database Server: MySQL
MySQL version: 5.7.25-log
PHP: 5.6.40
Server version: Apache/2.4.39 (cPanel) OpenSSL/1.0.2r mod_bwlimited/1.4

Any ideas how to clear this?



vbgamer45

You have to increase the hits column in the ads table to a larger integer datatype.
Like what I do please support me on https://www.patreon.com/vbgamer45

melktert

Thanks

I changed the hits value to 1 and that took the error away.

What datatype do you suggest?

vbgamer45

bigint i believe that's what I used in the latest version.
Like what I do please support me on https://www.patreon.com/vbgamer45

melktert

Thank you
I've made the change. I did upgrade to latest version but appears it didn't update the database.

Thanks again for your help