Menu

#33 legacy sqlite v. 2 frontend

0.99.3
open
nobody
None
5
2016-03-23
2016-03-23
No

This is not a real bug as using SQLite v. 2 for frontend is deprecated since version 0.99, I know.
Anyway I got an error on this code (it's inside admin/gestione_tabelle_gruppi.php):

SELECT t.table_name, t.visibile, t.in_insert, t.in_update, t.in_delete, t.data_modifica, t.id_table, t.commento , t.table_type, 
(
   SELECT count(*)
   FROM registro_submask s
   WHERE s.id_table = t.id_table
) as n_sottomaschere
FROM registro_tab t WHERE t.gid=0
ORDER BY t.table_type, t.table_name ASC;

This one works:

SELECT t.table_name, t.visibile, t.in_insert, t.in_update, t.in_delete, t.data_modifica, t.id_table, t.commento , t.table_type,
   count(s.id_table) AS n_sottomaschere
FROM registro_tab t
     LEFT JOIN registro_submask s ON s.id_table=t.id_table
WHERE t.gid=0
ORDER BY t.table_type, t.table_name ASC

and it's fully equivalent.
Are there incompatibility risks in substituting this sintax to the preceding one?

Discussion


Log in to post a comment.