偶是个菜鸟,请教高手下,我用下面的语句查询到结果如下,使用url做的查询条件。
我现在想用时间和url做查询条件,比如我想查询2009年08月04日这条url的所有记录(其他条件不变),查询语句该怎么写呀,小的在这里先谢过大家了,哈哈。
select (time1/1000) as Connect_time,(time2/1000) as download_time,(content_len) as file_size,(up_time) as test_time,url from mob_speed where url like 'http://';
+--------------+---------------+-----------+---------------------+------------------+
| Connect_time | download_time | file_size | test_time | url |
+--------------+---------------+-----------+---------------------+------------------+
| 0.9690 | 0.3280 | 5825 | 2009-07-29 15:45:16 | http:// |
| 4.3280 | 1.4690 | 5825 | 2009-07-29 16:18:25 | http:// |
| 0.5000 | 0.5470 | 5825 | 2009-08-04 17:32:03 | http:// |
| 0.6870 | 0.5630 | 5825 | 2009-08-04 18:34:09 | http:// |
| 2.4690 | 0.2970 | 5825 | 2009-08-04 23:36:17 | http:// |
| 1.0780 | 0.4220 | 5825 | 2009-08-05 00:26:52 | http:// |
| 1.2030 | 0.3130 | 5825 | 2009-08-05 01:16:23 | http://|
| 1.1250 | 0.8590 | 5825 | 2009-08-05 02:37:16 | http://|
| 1.1250 | 0.2970 | 5825 | 2009-08-05 03:25:13 | http:// |
| 0.6570 | 0.1870 | 5825 | 2009-08-05 04:13:23 | http:///|
| 1.0310 | 0.3910 | 5825 | 2009-08-05 07:11:14 | http:// |
| 1.2810 | 0.3290 | 5825 | 2009-08-05 08:02:13 | http:// |
| 1.6560 | 0.8440 | 5825 | 2009-08-05 09:13:05 | http:// |
| 1.1090 | 61.0160 | 5825 | 2009-08-05 10:25:18 | http://|
| 0.8910 | 0.4370 | 5825 | 2009-08-05 11:35:34 | http:// |
| 7.7190 | 1.2030 | 5825 | 2009-08-05 12:44:01 | http:// |
| 0.9220 | 0.5150 | 5825 | 2009-08-05 14:12:07 | http:// |
| 1.4850 | 0.4840 | 5825 | 2009-08-05 15:35:03 | http:// |
| 0.8900 | 0.4690 | 5825 | 2009-08-05 16:56:12 | http:// |
+--------------+---------------+-----------+---------------------+------------------+
我现在想用时间和url做查询条件,比如我想查询2009年08月04日这条url的所有记录(其他条件不变),查询语句该怎么写呀,小的在这里先谢过大家了,哈哈。
select (time1/1000) as Connect_time,(time2/1000) as download_time,(content_len) as file_size,(up_time) as test_time,url from mob_speed where url like 'http://';
+--------------+---------------+-----------+---------------------+------------------+
| Connect_time | download_time | file_size | test_time | url |
+--------------+---------------+-----------+---------------------+------------------+
| 0.9690 | 0.3280 | 5825 | 2009-07-29 15:45:16 | http:// |
| 4.3280 | 1.4690 | 5825 | 2009-07-29 16:18:25 | http:// |
| 0.5000 | 0.5470 | 5825 | 2009-08-04 17:32:03 | http:// |
| 0.6870 | 0.5630 | 5825 | 2009-08-04 18:34:09 | http:// |
| 2.4690 | 0.2970 | 5825 | 2009-08-04 23:36:17 | http:// |
| 1.0780 | 0.4220 | 5825 | 2009-08-05 00:26:52 | http:// |
| 1.2030 | 0.3130 | 5825 | 2009-08-05 01:16:23 | http://|
| 1.1250 | 0.8590 | 5825 | 2009-08-05 02:37:16 | http://|
| 1.1250 | 0.2970 | 5825 | 2009-08-05 03:25:13 | http:// |
| 0.6570 | 0.1870 | 5825 | 2009-08-05 04:13:23 | http:///|
| 1.0310 | 0.3910 | 5825 | 2009-08-05 07:11:14 | http:// |
| 1.2810 | 0.3290 | 5825 | 2009-08-05 08:02:13 | http:// |
| 1.6560 | 0.8440 | 5825 | 2009-08-05 09:13:05 | http:// |
| 1.1090 | 61.0160 | 5825 | 2009-08-05 10:25:18 | http://|
| 0.8910 | 0.4370 | 5825 | 2009-08-05 11:35:34 | http:// |
| 7.7190 | 1.2030 | 5825 | 2009-08-05 12:44:01 | http:// |
| 0.9220 | 0.5150 | 5825 | 2009-08-05 14:12:07 | http:// |
| 1.4850 | 0.4840 | 5825 | 2009-08-05 15:35:03 | http:// |
| 0.8900 | 0.4690 | 5825 | 2009-08-05 16:56:12 | http:// |
+--------------+---------------+-----------+---------------------+------------------+
解决方案 »
- phpMyAdmin为什么会出错?
- MySQL海量数据插入,导致服务器性能下降,怎么处理,急急急
- [求助]怎样把MYSQL数据库的JDBC驱动程序加入到WEBLOGIC SERVER的CLASSPATH
- 8G单表如何处理
- 如何判断两个字段的值是否相等?
- 为什么我的MY SQL 服务总是开不了啊???
- mysqld的问题
- linux+php+apache+PostgreSQL连接数据库出错,请高手指教
- my.ini setup中那六个选项mysqld-shareware,mysqld.exe,mysqld-max.exe mysqld-opt.exe......有什么区别?应该用哪一个?
- 关于三级封锁协议的一点小疑问
- 主主复制失败
- 【Insert into table 问题】
and date_format(test_time,'%Y-%m-%d')='2009-08-04'