我有一个像下面的桌子
tbl_test
test_id name val
1 ab 1
2 ac 1
3 ad 2
4 af 3
5 fg 2
6 ss 1
7 dd 3
Run Code Online (Sandbox Code Playgroud)
我想在同一查询中根据val来计算名称
试过了
(select count(name ) where val='1' ) as one,
(select count(name ) where val='2' ) as two,
(select count(name ) where val='3' ) as thr
Run Code Online (Sandbox Code Playgroud)
预期产量
test_id name val
1 ab 1
2 ac 1
3 ad 2
4 af 3
5 fg 2
6 ss 1
7 dd 3
Run Code Online (Sandbox Code Playgroud)
我是 codeigniter 的新手,并尝试使用 tank auth 建立登录注册。Tank auth 显示以下错误。
遇到 PHP 错误
严重性:8192
消息:与它们的类同名的方法在 PHP 的未来版本中将不再是构造函数;PasswordHash 有一个不推荐使用的构造函数
文件名:phpass-0.1/PasswordHash.php
行号:27
代码
<?php
#
# Portable PHP password hashing framework.
#
# Version 0.1 / genuine.
#
# Written by Solar Designer <solar at openwall.com> in 2004-2006 and placed in
# the public domain.
#
# There's absolutely no warranty.
#
# The homepage URL for this framework is:
#
# http://www.openwall.com/phpass/
#
# Please be sure to update the Version line if …Run Code Online (Sandbox Code Playgroud)