标签:
字段名 | 数字类型 | 数据宽度 | 是否为空 | 是否主键 | 自动增加 | 默认值 |
id | int | 4 | 否 | primary key | auto_increment | |
name | char | 20 | 否 | |||
sex | int | 4 | 否 | 0 | ||
degree | double | 16 | 是 |
FirstName | LastName | Age |
---|---|---|
Peter | Griffin | 35 |
Glenn | Quagmire | 33 |
<?php $con = mysql_connect("localhost","peter","abc123"); if (!$con) { die(‘Could not connect: ‘ . mysql_error()); } mysql_select_db("my_db", $con); mysql_query("DELETE FROM Persons WHERE LastName=‘Griffin‘"); mysql_close($con); ?>在这次删除之后,表是这样的:
FirstName | LastName | Age |
---|---|---|
Glenn | Quagmire | 33 |
标签:
原文地址:http://www.cnblogs.com/jxldjsn/p/5691514.html