php开发中sql语句拼接示例
1.插入语句
$sql="insert into Ad(AdClassID,AdType,AdTit,AdFileName,AdUrl,AShow,Addtime) values('".$AdClassID."','".$AdType."','".$AdTit."','".$AdFileName."','".$AdUrl."','1','".$Addtime."')";
2.从数据库中选出数据
$sql = "select * from AdClass order by ID desc";
$sql="select * from admin where AdminID='".$_SESSION['AdminID']."'";
3.更新数据库中记录数据
$sql="update Ad set AdClassID='".$AdClassID."',AdType='".$AdType."',AdTit='".$AdTit."',AdFileName='".$AdFileName."',AdUrl='".$AdUrl."',Addtime='".$Addtime."' where ID=".$ID."";
----------------
Lynx
The quieter you become,the more you are able to hear.