看看哪里錯(cuò)了
if(mysql_query('insert into school(name,sex) values(/'李四/',男);')){
echo "插入成功,插入的數(shù)據(jù)條數(shù)為:";
echo mysql_affected_rows($con);//連接標(biāo)識(shí)符
//當(dāng)修改的數(shù)據(jù)和之前一樣的時(shí)候,影響條數(shù)為0
}else{
echo "插入失敗";
}
if(mysql_query('insert into school(name,sex) values(/'李四/',男);')){
echo "插入成功,插入的數(shù)據(jù)條數(shù)為:";
echo mysql_affected_rows($con);//連接標(biāo)識(shí)符
//當(dāng)修改的數(shù)據(jù)和之前一樣的時(shí)候,影響條數(shù)為0
}else{
echo "插入失敗";
}
2018-12-26
舉報(bào)