PHP中向MYSQL中插入数据的问题

2025-04-17 09:33:33
推荐回答(1个)
回答1:

.号在PHP里面是做字符连接的。
比如:
$a = "hello";
$b = $a.",world";
echo $b;//b就是hello,world

晕倒,$query="insert into books values ('".$isbn."','".$author"')";
这个是把$isbn,$author这两个变量的值一起加到这个字符串里去,然后拼成一个sql语句,到数据库去的啊