Answer the question
In order to leave comments, you need to log in
Why is the value from the database not displayed in the smarty template?
Hello, tell me why the record id is not displayed from the database to the template?
function maxListUsersViwed($id) {
global $db;
$max_list_users_viewed=$db->fetchRow("select `id` from ".TABLE_AQQ." where `user_id`='$id' ORDER BY `viewed` DESC LIMIT 1");
if(!$max_list_users_viewed) return 0;
return $max_list_users_viewed;
}
$max_list_users_viewed = $usr->maxListUsersViwed($crt_usr);
$smarty->assign("$max_list_users_viewed", $max_list_users_viewed);
<a href="{$live_site}/edit.php/id={if isset($max_list_users_viewed) && $max_list_users_viewed}{$max_list_users_viewed}{else}0{/if}"> </a>
Answer the question
In order to leave comments, you need to log in
in assign, the dollar sign is extra in the first parameter
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question