I have a question about sql and the dashboard from the wiki.
So, I have a dashboard.php and in the handle function i have this :
- Code: Select all
$app =& Dataface_Application::getInstance(); // reference to Dataface_Application object
$auth =& Dataface_AuthenticationTool::getInstance();
$user =& $auth->getLoggedInUser();
// Perform a custom SQL Query:
$res = mysql_query("select * from Event where fk_user = $user->getValue('id') ", $app->db());
df_display(array('Project'=>$projects,'Event'=>$res), 'dashboard_project.html');
Then in the dashboard_project.html (from the templates directories) , I have :
- Code: Select all
{use_macro file="Dataface_Main_Template.html"}
{fill_slot name="main_column"}
{foreach from=$Event item=event}
<li><a href="{$event->getURL('-action=view')}#embed"> {$event->getTitle()} </a><br /><em>from project name_of_project</em></li>
{/foreach}
{/fill_slot}
{/use_macro}
But this code doesn't work...
Anybody know something about this ?
Thank you !