Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: PHP Fatal error: Uncaught Exception: SafeMySQL: Division by 0
endemik
Newbie
Posts: 1
Post PHP Fatal error: Uncaught Exception: SafeMySQL: Division by 0
on: February 5, 2020, 16:18

The error occurs on different servers. I have no idea how to handle this. Please some advice.

[05-Feb-2020 12:46:51 UTC] PHP Fatal error: Uncaught Exception: SafeMySQL: Division by 0. Full query: [CREATE TEMPORARY TABLE stats_hour ENGINE=MEMORY SELECT t.trade_id,
sum(t.qualified_clicks) AS h_clicks, sum(t.monthly_unique) AS h_monthly_unique,
sum(t.qualified_return) AS h_return, sum(t.ca)/sum(t.qualified_return) AS h_ca,
1 AS h_clicks_weight, sum(t.qualified_ins) AS h_ins,
1 AS h_in_weight
FROM traders l LEFT JOIN tradestats t ON l.id = t.trade_id
WHERE (t.timestamp is NULL OR t.timestamp>=1580903211) AND l.enabled AND NOT l.feeder GROUP BY t.trade_id] in /home/topxxxads/xxx/ftt2/system/application/libraries/safemysql.php:7
Stack trace:
#0 /home/topxxxads/xxx/ftt2/system/application/libraries/safemysql.php(5): SafeMySQL->error('SafeMySQL: Divi...')
#1 /home/topxxxads/xxx/ftt2/system/application/libraries/safemysql.php(4): SafeMySQL->rawQuery('CREATE TEMPORAR...')
#2 /home/topxxxads/xxx/ftt2/system/application/libraries/database.php(3): SafeMySQL->safeQuery('CREATE TEMPORAR.. in /home/topxxxads/xxx/ftt2/system/application/libraries/safemysql.php on line 7

admin
Administrator
Posts: 130
Post Re: PHP Fatal error: Uncaught Exception: SafeMySQL: Division by 0
on: February 5, 2020, 17:11

Hello,
please, add this line in your mysql configuration file in [mysqld] section:
sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

And restart mysql

karolina
Newbie
Posts: 2
Post Re: PHP Fatal error: Uncaught Exception: SafeMySQL: Division by 0
on: November 10, 2021, 16:31

[/embed][embed][embed][/embed]

karolina
Newbie
Posts: 2
Post Re: PHP Fatal error: Uncaught Exception: SafeMySQL: Division by 0
on: November 10, 2021, 16:31

[/embed][embed][embed][/embed]

Pages: [1]
Mingle Forum by cartpauj
Version: 1.0.33.3 ; Page loaded in: 0.02 seconds.