08 2020 档案

摘要:COALESCE(value,value,…)是一个可变参函数,可以使用多个参数。 作用:接受多个参数,返回第一个不为NULL的参数,如果所有参数都为NULL,此函数返回NULL;当它使用2个参数时,和IFNULL函数作用相同。 使用场合:假如某个字段默认是null,你想其返回的不是null,而是比 阅读全文
posted @ 2020-08-07 15:06 但为君故。 阅读(380) 评论(0) 推荐(0)
摘要:public static void downJDProductComment() throws IOException { String url = "https://club.jd.com/comment/productPageComments.action?productId=10001119 阅读全文
posted @ 2020-08-06 15:28 但为君故。 阅读(851) 评论(0) 推荐(0)
摘要:是不是所有练习爬虫的人都会去爬取商品信息。。。 下面是爬取京东上商品信息的代码(只爬取了一页数据) public void downJDProduct() throws IOException { String input = "辣条";// 以辣条为例,可以给这个方法加一个参数,这样就能接收用户输 阅读全文
posted @ 2020-08-06 14:06 但为君故。 阅读(2524) 评论(0) 推荐(0)
摘要:在使用爬虫进行一些数据爬取的时候,难免会碰上IP被封的情况,因此提前做个准备,写了一个简单的程序先爬取一些代理IP。 public void downIP() throws IOException { // 需要爬取IP信息的网站地址 String url = "http://www.66ip.cn 阅读全文
posted @ 2020-08-05 16:52 但为君故。 阅读(1306) 评论(0) 推荐(0)
摘要:select * from tablename as t where(t.field1 like '%param1%' or 'param1' is null) or (t.field2 like '%param2%' or 'param2' is null) ... tablename 为表名 f 阅读全文
posted @ 2020-08-05 15:49 但为君故。 阅读(4760) 评论(4) 推荐(0)