i want to programm a new module for my page... The init and the delete are working. I also have DB-table with data in it. The working command in PHP is (with escape-chars):
pnuserapi.php:
Code
//part of code in function "gettitles"
list($dbconn) = pnDBGetConn();
$sql = "SELECT pn_letter AS \"letter\", pn_genre AS \"genre\", pn_titel AS \"title\", pn_gid AS \"gid\" FROM zk__cheats_spiele";
//....More Code here...
$sql.= " ORDER BY pn_titel ASC; ";
$result = $dbconn->Execute($sql);
list($dbconn) = pnDBGetConn();
$sql = "SELECT pn_letter AS \"letter\", pn_genre AS \"genre\", pn_titel AS \"title\", pn_gid AS \"gid\" FROM zk__cheats_spiele";
//....More Code here...
$sql.= " ORDER BY pn_titel ASC; ";
$result = $dbconn->Execute($sql);
Then i gave the value of $result into a new variable $titles in pnuser.php:
Code
$titles = pnModAPIFunc('Cheats', 'user', 'gettitles', array('genre' => 'Racing', 'letter' => 'W'));
$pnRender->assign('titles', $titles);
return $pnRender->fetch('cheats_user_main.html');
$pnRender->assign('titles', $titles);
return $pnRender->fetch('cheats_user_main.html');
This variable $titles i assigned in pnRender. Now i don't know how to read out in the template:
^^Isn't this the right way? What i must do? The Function doesn't show anything, altough there are data in the DB.
Sry fr my bad - worse
edited by: WorldRacer, Jul 18, 2008 - 10:50 AM
