最近在处理数据库转移的活(把就网站的数据库拷贝到新的网站中),本来想写个脚本的,但是上面催的急,就先手工导入了数据。导入后遇到一个问题就是:原先的图片路径和新的网站中不一致。
1 | UPDATE `table_name` |
就这么一句话解决了所有的问题!在此感谢博客园。
参考页面:http://www.cnblogs.com/freespider/archive/2011/09/13/2174386.html
MySQL “where” field is case-sensitive. so when you need to make in-sensitive, you’d add COLLATE UTF8_GENERAL_CI
when doing search, like below:
1 | SELECT * |
Thanks for: http://stackoverflow.com/questions/2876789/case-insensitive-for-sql-like-wildcard-statement
If you want to select the 500th record from a table, you can do it like below:
1 | SELECT products_id |
Thanks for: http://stackoverflow.com/questions/16568/how-to-select-the-nth-row-in-a-sql-database-table