A
acpan author
Hi, I migrated my projects from 5.1 to 5.2, without any modification,
i tested the pages and found 1 error related to checkboxlist: Error type 256
Error description Unknown column 'cat_id' in 'where clause'
URL XX.XX.XX.XX/X/X_Alerts_edit.php?editid1=30
Error file xx\xx\xx\xx\include\dbconnection.php
Error line 35
SQL query SELECT DISTINCT id ,if( name like '#%',name,CONCAT (name, ' [',(select count(t2.id) from addressbook as t2 where t2.cat_id = addressbook_cat.id and t2.unsubscribed = 0) +(select count() from addressbook_cat_opt_in where cat_id like concat(addressbook_cat.id,',%') OR cat_id like concat('%',addressbook_cat.id,',%') OR cat_id like concat(',',addressbook_cat.id) OR cat_id like
addressbook_cat.id OR cat_id like concat('%,',addressbook_cat.id)),'] ' )) FROM addressbook_cat WHERE cat_id ='119,133,385' ORDER BY addressbook_cat .name limit 0,1 I then echoed out the dbconnection.php's function db_query $strLastSQL for php 5.1 project; SELECT if( name like '#%',name,CONCAT (name, ' [',(select count(t2.id) from addressbook as t2 where t2.cat_id = addressbook_cat.id and t2.unsubscribed = 0) +(select count() from addressbook_cat_opt_in where cat_id like concat(addressbook_cat.id,',%') OR cat_id like concat('%',addressbook_cat.id,',%') OR cat_id like concat(',',addressbook_cat.id) OR cat_id like addressbook_cat.id OR cat_id like concat('%,',addressbook_cat.id)),'] ' )) FROM addressbook_cat WHERE id in (119,133,385) and (gid =132 AND master = 1 AND shared_with_client = 1 AND name not like '#%' ) i suppose the above is the lookup table's combined link id, display as field and where clause SQL Query string. Notice the differences:
- Seems like 5.2 use cat_id = "x,x,x" (wrong) where as 5.1 uses id In (x,x,x) (correct). Even the field "cat_id" used above is wrong, should be "id".
- Seems like some last part of the query string in 5.2 above was missing,
could be due to error that it stopped there.
- 5.1 work but 5.2 does not work.
Appreciate your advise and fixes. acpan
|
|