mysql调用后
用mysql_query,mysql_fetch_array()后应该要
free_result().function count_admin($where = '')
{
if($where) $where = " WHERE $where";
$result = $this->db->get_one("SELECT count(*) as num from $this->table_admin_role $where");
return $result['num'];
}
相关文档:
以下的文章是MySQL grant语法的详细解析,如果你对MySQL grant语法的相关的实际操作有兴趣的话,你就可以对以下的文章点击观看了。我们大家都知道MySQL数据库赋予用户权限命令的简单格式可概括为:
grant 权限 on 数据库对象 to 用户
一、grant 普通数据用户,查询、插入、更新、删除 数据库中所有表数据的权利。
grant ......
1. 给root加密码:/usr/bin/mysqladmin -u root password 123456
2. 导出:mysqldump -u root -p dbname > file.sql
3. 导入:mysql -u root -p dbname < backup-file.sql
4. 授权:grant all on *.* to root@"%" identified by "密码";
5. 收回权限:revoke all privileges on *.* from root@"%";
6. 登录:mys ......
写入时,先做encode:
public static String encode(String src) {
String result = null;
try {
result = new String(src.getBytes("gbk"), "ISO-8859-1");
} catch (UnsupportedEncodingException uee) {
System.err.println(uee);
}
return result;
}
读出时,再做decode:
public static String deco ......