Hi Jure,

great that you've risen to this challenge and I'm joining you in this endeavour. I estimate there is roughly 5% of SQL queries currently NOT using Cake's ORM. I advocate full use of ORM, because it's compatible across all major supported DBMS. You may have noticed how not using ORM leads to the following ugly MSSQL fix:

> $resultset=$this->Survey->query('SELECT user_id FROM results_'.$survey_id.' as singleresult where save_id=\''.$result_id.'\' group by  user_id');
> if ($this->db->config['driver']=='mssql') $resultset[0]['singleresult']=$resultset[0][0];  //MSSQL fix

Therefore, please commit your current trunk and I'll start fixing custom queries. 

Many thanks,


2009/12/5 Jure Čuhalev <gandalfar@gmail.com>

I'm currently working on adding table prefix support to LS2. To get this initial patch working I've:

- backported according changes to auto_migrate.php
- added {prefix} to all direct SQL sentences in YML
- cleaned up installation_controller

Before comitting this to trunk, I'd like to hear your opinions on the YML change.

Additionally, commiting this will break any direct SQL that is not using ORM, so quite a bit of testing a fixing will be needed.

Jure Cuhalev

Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
limesurvey-developers mailing list