CodeIgniter Forums
CI 3.1.13 + PHP 7.4 DB error - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6)
+--- Forum: CodeIgniter 3.x (https://forum.codeigniter.com/forumdisplay.php?fid=17)
+--- Thread: CI 3.1.13 + PHP 7.4 DB error (/showthread.php?tid=88524)



CI 3.1.13 + PHP 7.4 DB error - Smekke - 09-21-2023

So I inherited an older site running CI 3.0.x
I have upgraded CI 3 to the latest version (3.1.13).
Currently running PHP 7.0.33
I'd want to upgrade to PHP 7.4.33 to be at least a little more up-to-date but whenever I do that I get a very random error on the index page.

Code:
Error Number: 1146
Table 'database.A' doesn't exist
SELECT a.* FROM A a WHERE a.`show` = 1 ORDER BY a.A LIMIT 5
Filename: models/Mod_modules.php
Line Number: 1363
It seems to try and perform a select from a random table called 'A'?
Obviously it doesn't exist but I can't really figure out why the change in PHP suddenly results in this bogus query running.

in database.php, my dbprefix = ''. I don't have any prefixes on the tables.

Hoping someone might have an idea.



UPDATE: somehow all of this went away, very weird, but ok.


RE: CI 3.1.13 + PHP 7.4 DB error - JustJohnQ - 09-21-2023

Post the code which generates this error