insert into 可不可以使用 where 语法
时间:2011-09-22
来源:互联网
小弟正在写档案上传系统
很简陋的档案上传
小弟想问insert into [dbname] (xxx,xxx,xxx) values (xxx,xxx,xxx) where xxx='xxx';
后面那句话可不可以成立?
我试了好几次都没办法,
都是档案上传失败
$str = "insert into bulletin (file_1,file_2,file_3,file_4) values ('$file_1','$file_2','$file_3','$file_4') where bulletin(serial)='$serial'";
请问一下该如何解决!!!!!
感谢各位
很简陋的档案上传
小弟想问insert into [dbname] (xxx,xxx,xxx) values (xxx,xxx,xxx) where xxx='xxx';
后面那句话可不可以成立?
我试了好几次都没办法,
都是档案上传失败
$str = "insert into bulletin (file_1,file_2,file_3,file_4) values ('$file_1','$file_2','$file_3','$file_4') where bulletin(serial)='$serial'";
请问一下该如何解决!!!!!
感谢各位
作者: 黑色死亡 发布时间: 2011-09-22
不行
但你可以先 select 出来后再用 php 判断要不要 insert
另外建议 insert 这样写
INSERT INTO db SET col1='$col1', col2='$col2'......
这样比较不会搞混栏位
但你可以先 select 出来后再用 php 判断要不要 insert
另外建议 insert 这样写
INSERT INTO db SET col1='$col1', col2='$col2'......
这样比较不会搞混栏位
作者: culaid 发布时间: 2011-09-22
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28