Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught mysqli_sql_exception #23

Open
Larsnielsen123 opened this issue Jan 10, 2022 · 2 comments
Open

Uncaught mysqli_sql_exception #23

Larsnielsen123 opened this issue Jan 10, 2022 · 2 comments

Comments

@Larsnielsen123
Copy link

Suddenly this started, i have never had problems

I tried with a new examples page, dosent work

https://jn.stid.dk/crud/examples/example.php

Total Returned Rows: Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 in /customers/c/0/0/stid.dk/httpd.www/jn/crud/preheader.php:144 Stack trace: #0 /customers/c/0/0/stid.dk/httpd.www/jn/crud/preheader.php(144): mysqli->query('SELECT COUNT()...') #1 /customers/c/0/0/stid.dk/httpd.www/jn/crud/ajaxCRUD.class.php(415): q1('SELECT COUNT()...') #2 /customers/c/0/0/stid.dk/httpd.www/jn/crud/ajaxCRUD.class.php(773): ajaxCRUD->getNumRows() #3 /customers/c/0/0/stid.dk/httpd.www/jn/crud/examples/example.php(108): ajaxCRUD->insertRowsReturned() #4 {main} thrown in /customers/c/0/0/stid.dk/httpd.www/jn/crud/preheader.php on line 144

@alloja
Copy link

alloja commented Oct 21, 2022

Hej Lars,
PHP8 seems to break the implementation of the class. In ajaxCRUD.class.php, replacing 'class' by '__construct' on line 137 should do the trick.

@videobuff
Copy link

videobuff commented Dec 5, 2022

I have just now the same issue, but replacing 'class' with __construct gives me the following error:

Parse error: syntax error, unexpected identifier "ajaxCRUD" in /var/www/html/kk/ajaxCRUD.class.php on line 133

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants