您的位置:首页 > 编程语言 > PHP开发

php中向mysql插入数据

2015-01-06 17:43 267 查看
1 $sql='insert into news(title,subtitle,source,publishtime,content,image,author) values("'.unicode_decode(strval($newsTitle),"utf-8").'","","'.unicode_decode(strval($newsSource),"utf-8").'","2012-12-12 10:10","","","")';

2

3

4 if($conn->multi_query($sql)){

5 echo "success";

6 }else{

7 echo "insert failure";

8 }
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: