{$create_time|date="y-m-d",###}
date函数的第二个变量就是变量本身,这里就用###表示这个变量$create。
{$data.content|strip_tags}
主要是模板中使用没有参数的函数。
如果函数有参数,参数写在函数后面用等号=连接,不同参数按顺序用逗号连接。
{#$vo.content|preg_replace='/<img.*?>/si','',###|strip_tags|mb_substr=0,200,'utf-8'#}
{#$vo.content|mb_substr=0,5,'utf-8'#}
$this->success("注册成功","/index.php");
第二个参数就是指定跳转地址
mysql> select t1.tid,t1.uid,t2.userid,t2.username from talk_rec t1 left join (select userid,username from t_users) t2 on t1.uid=t2.userid limit 10;
+-----+------------------+------------------+--------
和孩子一起玩耍,让孩子开心也许是增加父女感情的好方法
$info = $db->getRow("select ……
$smarty->assign("info", $info);
{#$info.newstrco#}
每个用户单独增加个字段用于记录未读信息。默认为0,如果有新的信息就加1。
被关注的人一旦发送信息就遍历出所有关注他的人,然后获取这些人的uid,然后在他们的统计未读字段中加1。
总结思路:
被关注的人一旦发送消息就获取所有关注他的人,然后在这些人的关注字段加1。
mysql> select (case when 2>1 then 2 end) a from shop_goods_list where id=384;
+---+
| a |
| 2 |
1 row in set