Blogger Information
Blog 250
fans 3
comment 0
visits 321586
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
PHP函数操作MYSQL删改操作
梁凯达的博客
Original
757 people have browsed it

实例

<?php

	$link = mysqli_connect('localhost','root','123456');

	if (mysqli_connect_errno($link)>0) {
		echo  mysqli_connect_error($link);exit;
	}

	mysqli_select_db($link,'ss34');

	mysqli_set_charset($link,'utf8');


	//$sql="UPDATE info SET name='恐龙先生',city='英国' WHERE id=22";
	$sql="DELETE FROM info WHERE id=23";
	//echo $sql;exit;
	$result = mysqli_query($link,$sql);

	if($result && mysqli_affected_rows($link)>0){
		//echo '修改成功';
		echo '删除成功';
	}else{
		//echo '修改失败';
		echo '删除失败';
	}

	mysqli_close($link);

运行实例 »

点击 "运行实例" 按钮查看在线实例

 

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post