当前位置:Gxlcms > PHP教程 > PHP?mysql的??

PHP?mysql的??

时间:2021-07-01 10:21:17 帮助过:5人阅读

如?


想要在??mysql_result.php??中加入?除使用者??密?的功能,?他改?如下?,?他能???[?除]
??超??,就能?除掉那一行的值




??各位要怎?做呢??

以下是mysql_result.php的源?
        ?示所有??        

??密??示表

"; for ($i = 0; $i < mysql_num_fields($result); $i++) echo "" . mysql_fetch_field($result, $i)->name. ""; echo ""; for ($j = 0; $j < mysql_num_rows($result); $j++) { echo ""; for ($k = 0; $k < mysql_num_fields($result); $k++) echo "" . mysql_result($result, $j, $k) . ""; echo ""; } echo "" ; mysql_free_result($result); mysql_close($link); ?>



然後?有mysql.php??必要?案的源?





??要如何修改mysql_result.php ??成需要的效果呢? ??


回复讨论(解决方案)

javascript+ajax实现

        ?示所有??        

??密??示表

"; for ($i = 0; $i < mysql_num_fields($result); $i++) echo "" . mysql_fetch_field($result, $i)->name. ""; echo "操作"; echo ""; for ($j = 0; $j < mysql_num_rows($result); $j++) { echo ""; for ($k = 0; $k < mysql_num_fields($result); $k++) echo "" . mysql_result($result, $j, $k) . ""; echo ""; echo ""; } echo "" ; mysql_free_result($result); mysql_close($link); ?>

??已找到解?方法:)

//以下是重新做的mysql_result.php源?
//mysql_result.php





?料列表





require_once("mysql.php");
$link = create_connection();

echo "

";
echo "";
$sql = "SELECT no AS 'no',username AS 'username',password AS 'password' FROM root";
$result = execute_sql("os",$sql,$link);

while($row = mysql_fetch_array($result))
{
?>

$no = $row['no'];
$username = $row['username'];
$password = $row['password'];

echo "";
echo "";
echo "";
echo "";
echo "";
echo "";




?>





}
?>





然後??no值?到del.php ?行?料?值的?除?理:

//del.php

require_once("mysql.php");
$link = create_connection();
$no = $_GET["no"];

//$sql = "DELETE FROM root WHERE no = $no";

//$result = execute_sql("os",$sql,$link);

echo "";


?>

人气教程排行

??使用者??密?操作
{$no}{$username}{$password}?除