When my shared hosting upgrade mysql version from 5 to 8, many of my php websites cannot be openned.
I checked php error log saw many syntax become error.
So here are the fixes of syntax :
Codeigniter : Library > common.php
Cannot combine Select, Table, Where in 1 query.
Must saperate Select, Table, Where.
Cannot write query join tables in 1 query (library/common.php).
Must saperate join tables.
Must saperate Group_By :
Must saperate Order_By :
Php pdo :
select and display data from database :
important at :
1) try
2) {$row['id']}
Join 2 tables + Group_by + Order_by :
If sql got error then check this two things :
Limit : (Must delete limit if no use limit, otherwise no result will show)
php variable in WHERE clause :
wordpress error :
Posted by Zac1987 on
28 August, 2023
0 comments