I use MySQL. Upon investigating, I found that it is probably due to a bug in vfront-0.96c/rpc.php where the name of the tables are not between ` and the ordering parameter being shown twice.
The database log shows
SELECT * FROM cases ORDER BY index ASC,index ASC LIMIT 1
with the message
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'index ASC,index ASC LIMIT 1' at line 1
The correct syntax (according to MySQL documentation) should be
SELECT * FROM `cases` ORDER BY `index` ASC LIMIT 1
/rpc.php:253
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The above issue is in "form view". In "grid view", the SQL query is
SELECT index as pk, index,date,district,panchayat,place,contact_name,contact_email,contact_phone,contact_org,source,case_issue,project_name,land_type,info_source,details,number_villages,state,case_number FROM cases t1 ORDER BY index ASC LIMIT 20
and the error message is
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'index as pk, index,date,district,panchayat,place,contact_name,contact_email,cont' at line 1
/rpc.xmlgrid.php:308
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
I use MySQL. Upon investigating, I found that it is probably due to a bug in vfront-0.96c/rpc.php where the name of the tables are not between ` and the ordering parameter being shown twice.
The database log shows
SELECT * FROM cases ORDER BY index ASC,index ASC LIMIT 1
with the message
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'index ASC,index ASC LIMIT 1' at line 1
The correct syntax (according to MySQL documentation) should be
SELECT * FROM `cases` ORDER BY `index` ASC LIMIT 1
/rpc.php:253
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
The above issue is in "form view". In "grid view", the SQL query is
SELECT index as pk, index,date,district,panchayat,place,contact_name,contact_email,contact_phone,contact_org,source,case_issue,project_name,land_type,info_source,details,number_villages,state,case_number FROM cases t1 ORDER BY index ASC LIMIT 20
and the error message is
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'index as pk, index,date,district,panchayat,place,contact_name,contact_email,cont' at line 1
/rpc.xmlgrid.php:308
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
I fixed it.
in vfront-0.96c/inc/func.frontend.php, line 1030
$string_orderby.=$orderby_a[$i]." ".$orderby_sort_a_string.",";
should be replaced by
$string_orderby.="`".$orderby_a[$i]."` ".$orderby_sort_a_string.",";
This is a MySQL only fix. Probably the field name is not SQL standard (it contains spaces or other not-standard chars)