."VALUES('$theme','$text','$date')"
$query = "INSERT INTO news picture(theme,link,date)"
."VALUES('$ptheme','$plink','$pdate')"
sql语句错了
news txt 这个应该是 news_txt吧
news picture也应该是news_picture
除此之外 values前面要加空格,合理的是
$query = "INSERT INTO news txt(theme,text,date)"
." VALUES('$theme','$text','$date')"
$query = "INSERT INTO news picture(theme,link,date)"
." VALUES('$ptheme','$plink','$pdate')"
另外:
$result = mysql_query($query)这样只能插入news_picture的那个表。news_txt无法插入了
改为
$query = "INSERT INTO news txt(theme,text,date)"
." VALUES('$theme','$text','$date')"
$query1 = "INSERT INTO news picture(theme,link,date)"
." VALUES('$ptheme','$plink','$pdate')"
$result = mysql_query($query)
$result1= mysql_query($query1)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)