php往插入数据库插入数据
作者:互联网
$str=‘ximing’;
s
q
l
2
=
"
I
N
S
E
R
T
I
N
T
O
‘
b
i
a
o
b
a
i
2
‘
(
‘
i
d
‘
,
‘
n
a
m
e
‘
,
‘
c
o
l
o
r
‘
,
‘
c
o
n
t
e
n
t
s
‘
)
V
A
L
U
E
S
(
′
1
9
′
,
(
′
sql2 = "INSERT INTO `biaobai2` (`id`, `name`, `color`, `contents`) VALUES ('19', ('
sql2="INSERTINTO‘biaobai2‘(‘id‘,‘name‘,‘color‘,‘contents‘)VALUES(′19′,(′str’), ‘black’, ‘xiandai’)";
注意变量格式数据(‘变量名’)
标签:name,color,biaobai2,数据库,插入,sql2,php,id,contents 来源: https://blog.csdn.net/m0_52364694/article/details/117202105