Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

problem to show data to template


Go to End


2 Posts   1443 Views

Avatar
bebabeba

Community Member, 193 Posts

21 January 2009 at 12:09am

Hi!
I can't see my data in tempalte..can you help me?

function Conn()
{

global $db_pandora;

$record=$db_pandora->query('SELECT * FROM mm_service');

$rec=array();
$id=array();
while($rec[]=$record->nextRecord())
{
}

for($i=0; $i<count($rec); $i++)
{
$id[$i]= $rec[$i]['id'];

}

while($id[]=$record->nextRecord())
{
}
return $this->customise($id);

}

Avatar
dio5

Community Member, 501 Posts

21 January 2009 at 9:02am

I'm not sure what you're trying to do, but in most cases you don't need to do any of this stuff :)