mysql设置bit类型数据
数据库的一张表里面存了关于一台设备的备份配置信息,类型是bit,主要就是是否已经配置,设置的时候取值是true,false,还是0,1呢?
纠结了半天,动手就好了,是0,1,而非true,false,
更新语句如下
update table_a
set configBaked= 0
where id in (2,3,4)
相关文档:
(1)登陆到mysql
C:\Documents and Settings\Administrator>mysql -h localhost -u root -p
Enter password: *****
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 69
Server version: 5.0.51a-community-nt MySQL Community Edition (GPL)
Type 'help;' or '\h' fo ......
MySQL触发器
一、 MySQL触发器概念
MySQL5.0以上版本支持触发器,触发器是与表有关的命名数据库对象,当表出现特定事件时,将激活该对象。
二、 MySQL触发器语法
CREATE TRIGGER trigger_name trigger_time trigger_event
ON tbl_name FOR EACH ROW trigger_stmt
trigger ......
PHP中的MYSQL常用函数总结
1、mysql_connect()-建立数据库连接
格式:
resource mysql_connect([string hostname [:port] [:/path/to/socket] [, string username] [, string password]])
例:
$conn = @mysql_connect("localhost", "username", "password") or dir( ......
1, MySQL profiling
mysql> set profiling = 1;
mysql> select count(*) from test;
mysql> show profiles;
mysql> show profile for query 1;
2,mysql 监控
http://bbs.linuxtone.org/thread-1854-1-1.html
http://code.google.com/p/mysql-cacti-templates/ -> Hig ......
Mysql Explain 详解
一.语法
explain < table_name >
例如: explain select * from t3 where id=3952602;
二.explain输出解释
+----+-------------+-------+-------+-------------------+---------+---------+-------+------+-------+
| id | select_type | table | type | possible_keys &nb ......