TOPIC: Reuse LimeSurveys DB connection

I am using Version 2.00+ Build 130219 and want to run a php script using a table that resides on the limesurvey-db.
My idea was to include_once("/application/config/config.php") and the work with this as I did using 1.9x.

Obviously the config file changed and the db connection is handled differently now.

Unfortunately I am not a programmer but rather able to script a little php. How can I use the existing limesurvey db connection by referencing the key/values needed?

Your "connection" is readily available most anywhere. The following is an example that you can play with:

//count number of answers$query="SELECT count(*) FROM {{survey_".intval($iSurveyID)."}}";$result= Yii::app()->db->createCommand($query)->queryAll();//$totalrecords = total number of answersforeach($resultas$row){$totalrecords=reset($row);}echo("total records: ".$totalrecords);