摘要:
mysql You can't specify target table for update in FROM clause解决方法出现这个错误的原因是不能在同一个sql语句中,先select同一个表的某些值,然后再update这个表。 <pre>mysql> update message set 阅读全文
posted @ 2019-11-15 10:34
newmiracle宇宙
阅读(253)
评论(0)
推荐(0)
摘要:
linux添加用户1、添加用户 首先用adduser命令添加一个普通用户,命令如下:#adduser tommy //添加一个名为tommy的用户#passwd tommy //修改密码Changing password for user tommy.New UNIX password: //在这里 阅读全文
posted @ 2019-11-15 10:33
newmiracle宇宙
阅读(681)
评论(0)
推荐(0)
摘要:
mysql互换表中两列数据 <pre>update product set original_price=price,price=original_price;</pre>上面sql语句显然不可取因为先执行original_price=price , original_price的值已经更新为pri 阅读全文
posted @ 2019-11-15 10:33
newmiracle宇宙
阅读(98)
评论(0)
推荐(0)
摘要:
mysql navcat备份使用详解 点击备份 然后新建备份 然后选择要备份的表 就可以了 以后这个表删除了 内容变更了 都可以点击 还原备份就可以了 阅读全文
posted @ 2019-11-15 10:32
newmiracle宇宙
阅读(229)
评论(0)
推荐(0)
摘要:
PHP提高in_array查找元素的方法<pre><?php$arr = array(); // 创建10万个元素的数组for($i=0; $i<100000; $i++){ $arr[] = $i;} // 记录开始时间$starttime = getMicrotime(); // 随机创建100 阅读全文
posted @ 2019-11-15 10:31
newmiracle宇宙
阅读(134)
评论(0)
推荐(0)
摘要:
mysql left join 右表数据不唯一的情况解决方法 <pre>member 表id username1 fdipzone2 terry member_login_log 表id uid logindate1 1 2015-01-012 2 2015-01-013 1 2015-01-024 阅读全文
posted @ 2019-11-15 10:31
newmiracle宇宙
阅读(1171)
评论(0)
推荐(0)
摘要:
PHP实现单点登录最简单的方法 a登录后 跳转到B url带参数传给B B再调用A接口(是否登录) 就可以了 阅读全文
posted @ 2019-11-15 10:31
newmiracle宇宙
阅读(420)
评论(0)
推荐(0)
摘要:
采集百度搜索的方法<pre><?phpfunction doCurl($url, $data=array(), $header=array(), $timeout=30){ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_se 阅读全文
posted @ 2019-11-15 10:30
newmiracle宇宙
阅读(1467)
评论(0)
推荐(0)
摘要:
php cli传递参数的方法 <pre>$options = "f:g:"; $opts = getopt( $options ); print_r($opts); </pre>在命令行下运行 /usr/local/php/bin/php ./getopt.php -f 123 -g 456<pre 阅读全文
posted @ 2019-11-15 10:30
newmiracle宇宙
阅读(552)
评论(0)
推荐(0)
摘要:
mysql查看正在运行的语句 并且查看运行最多的mysql语句 MySQL 打开 general log 后,所有的查询语句都会记录在 general log 文件,文件为只读方式,但这样general log文件会非常大,所以默认是关闭的。但有时需要查错等原因,暂时需要打开general log。 阅读全文
posted @ 2019-11-15 10:29
newmiracle宇宙
阅读(948)
评论(0)
推荐(0)

浙公网安备 33010602011771号