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.

General Questions

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

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

problem to show data to template


Reply

2 Posts   704 Views

Avatar
bebabeba

21 January 2009 at 12:09am Community Member, 192 Posts

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

21 January 2009 at 9:02am Community Member, 501 Posts

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