giandonatoinverso / PHP-Dynamic-Qr-code

PHP Dynamic Qr code is a script that allows the generation and saving of dynamic and static QR codes
MIT License
243 stars 73 forks source link

using a "DATABASE_PREFIX" like "qr_" gives error when trying to edit qr codes. #95

Closed hkdemiralp closed 4 months ago

hkdemiralp commented 4 months ago

I git clone the repo. Then edited the environment.php file same as the example suggestion: define('DATABASE_PREFIX', "qr_"); // This must have a trailing underscore. Example: qr_ Now, After I login and try to edit any qrcode by pressing edit button, this error comes:

Fatal error: Uncaught mysqli_sql_exception: Table 'qrcode.qr_qr_static_qrcodes' doesn't exist in /var/www/qr/html/src/lib/MysqliDb/MysqliDb.php:1988 Stack trace: #0 /var/www/qr/html/src/lib/MysqliDb/MysqliDb.php(1988): mysqli->prepare() #1 /var/www/qr/html/src/lib/MysqliDb/MysqliDb.php(1594): MysqliDb->_prepareQuery() #2 /var/www/qr/html/src/lib/MysqliDb/MysqliDb.php(738): MysqliDb->_buildQuery() #3 /var/www/qr/html/src/lib/MysqliDb/MysqliDb.php(764): MysqliDb->get() #4 /var/www/qr/html/src/lib/Qrcode/Qrcode.php(35): MysqliDb->getOne() #5 /var/www/qr/html/src/lib/StaticQrcode/StaticQrcode.php(337): Qrcode->getQrcode() #6 /var/www/qr/html/src/static_qrcode.php(12): StaticQrcode->getQrcode() #7 {main} thrown in /var/www/qr/html/src/lib/MysqliDb/MysqliDb.php on line 1988 If I don't use a database prefix, it seems to work fine.

giandonatoinverso commented 4 months ago

Solved in the new release