Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tool mit Smarty
#3
Also so:

Code:
{php}
$result_vil = mysql_query('SELECT * FROM `villages` WHERE `id` = ' . mysql_escape_string($_GET['village']));
$data_vil = mysql_fetch_assoc($result_vil);
$result_user = mysql_query('SELECT * FROM `users` WHERE `id` = ' . mysql_escape_string($data_vil['userid']));
$data_user = mysql_fetch_assoc($result_user);

// Den Usernamen in Smarty speichern
$this->_tpl_vars['user'] = $data_user;
{/php}

Ungetestet, sollte aber funzen Wink

Edit: Username wäre dann {$user.username}

MfG Manuel
Reply


Messages In This Thread
Tool mit Smarty - by knollenmax - 04.05.2011, 09:52
RE: Tool mit Smarty - by Yannici - 04.05.2011, 11:36
RE: Tool mit Smarty - by SlimShady95 - 04.05.2011, 12:24
RE: Tool mit Smarty - by Yannici - 04.05.2011, 12:38
RE: Tool mit Smarty - by knollenmax - 04.05.2011, 15:03
RE: Tool mit Smarty - by Yannici - 04.05.2011, 15:45
RE: Tool mit Smarty - by knollenmax - 04.05.2011, 17:11
RE: Tool mit Smarty - by Yannici - 04.05.2011, 19:35
RE: Tool mit Smarty - by knollenmax - 04.05.2011, 19:47



Users browsing this thread: 3 Guest(s)