Page 1 of 1

Pulling data from external database ?

Posted: Thu 30. Sep 2010, 15:42
by Vargas
Hi there,

I was wondering, is there any way to pull data from an external database and display the content of the fields in a CP ?
Or do i have to use own .php scripts to solve this ?

Re: Pulling data from external database ?

Posted: Sat 2. Oct 2010, 10:15
by Oliver Georgi
In general it is better to use custom a script based on phpwcms's framework features. I implement complex applications via frontend init/render by using functions like

Code: Select all

$mydata = _dbGet('mytable', '*', 'id='.$myid, 'fieldToBeGroupedBy', 'fieldToBeSortedBy', 10);

Re: Pulling data from external database ?

Posted: Sat 2. Oct 2010, 12:58
by Vargas
Thank you for your reply Oliver.
Until now i actually used external scripts to pull data into the CP.

But if i do understand you creect, it would be possible to create my own CP with de required fileds allready included ?
If that is right, i will give it a try for sure.

Re: Pulling data from external database ?

Posted: Sat 2. Oct 2010, 13:24
by Oliver Georgi
Yes, you can write your own module which integrates functionality very close into phpwcms including search support, content part. Or use just frontend render script to inject the phpwcms rendering process by using existing functions, db connection and so on.