ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

Åýcheckbox§P©w­þµ§³Q¤Ä¿ï

Åýcheckbox§P©w­þµ§³Q¤Ä¿ï

¤£¦n·N«ä§Ú·Q°Ý
­Y§Ú­n°µ·|­û¥i¥[¤J©Ð«Î¶i"·|­û³Ì·R"
¨Ã¥i¦b"·|­û³Ì·R"¸Ì§Q¥Îcheckbox§R°£¤@¾ã¦æ©Ð«Î¸ê®Æ
¤Ä¿ïcheckbox¨Ã¥B«ö¤U§R°£´N¥i¥H±N¦¹µ§©Ð«Î¸ê®Æ²¾°£
§Ú¤£ª¾¹D¦p¦óÅýcheckbox§P©w­þµ§³Q¤Ä¿ï ¨Ã¥B¥i¥H«ö¤U§R°£´N¥i²¾°£±¼¦Ó¤£¼vÅT¨ì¯u¥¿ªº¸ê®Æ®w
<?php session_start(); ?>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>¦a§}</title>


<?php

include("mysql_connect.inc.php");

$id = $_SESSION['member_account'];

$sqllove = "SELECT h. * , l.note
                   FROM mylove l, house h
                   WHERE l.houseAddress = h.houseAddress  AND '$id'= l.member_account";

$resultlove = mysql_query($sqllove);


echo"<script>";
echo"
function deleteData(){
mysql_query(\"DELETE FROM mylove WHERE houseAddress = '¥x¥_¿¤·s²ø¥««C¤s¸ô1¬q60¤§3¸¹3¼Ó'\");
}
";
          
echo"</script>";

?>




<style type="text/css">

      #newspaper-a
{
        font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
        font-size: 12px;
        width: 750px;
        text-align: left;
        border-collapse: collapse;
        border: 1px solid #69c;
        margin-top:0px;
        margin-left:70px;
}
#newspaper-a th
{
        padding: 12px 13px 12px 13px;
        font-weight: normal;
        font-size: 14px;
        color: #039;
        border-bottom: 1px dashed #69c;
}
#newspaper-a td
{
        padding: 7px 13px 7px 13px;
        color: #669;
}
#newspaper-a tbody tr:hover td
{
        color: #339;
        background: #d0dafd;
}

#bottonconpetitive{
                                margin-top:20px;
                                text-align:right;
}
#bottondelete{
                                margin-left:8px;
                                margin-top:20px;
                                text-align:right;
}


#tablecss{
                                width:750px;
                                margin-left:70px;
}


.style1 {
        text-align: right;
        padding-top:10px;
        border: 0px;
}

img {
        BORDER: 0px;
}

.lovehousetable{
                                width: 750px;
                                text-align: left;
                                margin: 20px;
                                margin-left: 70px;
                                margin-top:0px;
                                font-size: 18px;
                                font-family: ·s²Ó©úÅé;
                                color: #68228B;
                                font-weight: bold;
}



</style>


</head>

<body>
        <div class="lovehousetable"><img src="../../Users/Dinner/Desktop/session/fapaiwu.jpg" align="absbottom" ></img> ³Ì·Rªk©ç«Î²M³æ</div>
<table id="newspaper-a">
        <thead>
    <tr>      
      <th scope="col" style="height: 42px"><input name="Checkbox1[]" type="checkbox" /></th>
      <th scope="col" style="height: 42px">¦a§}</th>
      <th scope="col" style="height: 42px">©ç¼Æ</th>
      <th scope="col" style="height: 42px">©W¼Æ</th>
      <th scope="col" style="height: 42px">©³»ù</th>
      <th scope="col" style="height: 42px">©ç½æ¤é´Á</th>
      <th scope="col" style="height: 42px">³Æµù</th>
    </tr>
    </thead>
    <tbody>
        <?php
        While($myrowlove = mysql_fetch_row($resultlove)){
    echo"<tr>
      <td><input name=\"Checkbox1[]\" type=\"checkbox\" /></td>
      <td>$myrowlove[0]</td>
      <td>$myrowlove[9]©ç</td>
      <td>$myrowlove[4]©W</td>  
      <td>$myrowlove[7]</td>  
      <td>$myrowlove[6]</td>
      <td><input name=\"Text1\" type=\"text\" value=\"\" /></td>   
      </tr>";
      $address_temp=$myrow[3];
        }//for
       
        ?>
   
        </tbody>
  </table>
  
  <table id="tablecss" align="left">
          <tr>
                  <td class="style1" ><a href="../../Users/Dinner/Desktop/session/competitive.php" target="_blank"><span><img src="../../Users/Dinner/Desktop/session/compare.jpg" /></img></span></a> <img src="../../Users/Dinner/Desktop/session/delete.jpg" onClick= "deleteData()" ></img></td>
      
          </tr>
  </table>



</body>

</html>

¤£¦n·N«ä§Ú·Q°Ý
­Y§Ú­n°µ·|­û¥i¥[¤J©Ð«Î¶i"·|­û³Ì·R"
¨Ã¥i¦b"·|­û³Ì·R"¸Ì§Q¥Îcheckbox§R°£¤@¾ã¦æ©Ð«Î¸ê®Æ ...
zealousinm µoªí©ó 2010-8-29 10:42

"·|­û³Ì·R"¸Ìªº©Ð«Î¸ê®Æ,¬ö¿ý¦b¸ê®Æ®w¸Ì¹ï§a
Åýcheckbox§P©w­þµ§³Q¤Ä¿ï ¨Ã¥B¥i¥H«ö¤U§R°£´N¥i²¾°£±¼¦Ó¤£¼vÅT¨ì¯u¥¿ªº¸ê®Æ®w<---°µ¤£¨ì

©Ð¤lªº¸ê®ÆÀ³¸Ó«Ø¥ß¿W¥ß¸ê®Æªí(©Ð«Î¸ê®ÆÁ`ªí)<--§R°£³Ì·R¤£¼vÅT³o±i¸ê®Æªí
·|­û³Ì·Rªº©Ð¤l¸ê®Æ­n¬°¥t¤@±i¿W¥ß¸ê®Æªí(¨Ó¦Û©Ð«Î¸ê®ÆÁ`ªíªº°Æ¥»¸ê®Æ)<---§R°£³Ì·R¥u¼vÅT³o±i¸ê®Æªí
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

TOP

¬Oªº!! ¦³­Ó§Oªº¸ê®Æªí(·|­û³Ì·Rmylove¤Î©Ð«Îlove)  §Ú¤§«e»¡©ú¿ù»~

¦ý§Úµo²{§Ú·|°µ·|­û³Ì·RÅã¥Ü©Ð«Î¸ê°T

<table id="newspaper-a">
        <thead>
    <tr>      
      <th scope="col" style="height: 42px"><input name="Checkbox1[]" type="checkbox" /></th>
      <th scope="col" style="height: 42px">¦a§}</th>
      <th scope="col" style="height: 42px">©ç¼Æ</th>
      <th scope="col" style="height: 42px">©W¼Æ</th>
      <th scope="col" style="height: 42px">©³»ù</th>
      <th scope="col" style="height: 42px">©ç½æ¤é´Á</th>
      <th scope="col" style="height: 42px">³Æµù</th>
    </tr>
    </thead>
    <tbody>
        <?php
        While($myrowlove = mysql_fetch_row($resultlove)){
    echo"<tr>
      <td><input name=\"Checkbox1[]\" type=\"checkbox\" /></td>
      <td>$myrowlove[0]</td>
      <td>$myrowlove[9]©ç</td>
      <td>$myrowlove[4]©W</td>  
      <td>$myrowlove[7]</td>  
      <td>$myrowlove[6]</td>
      <td><input name=\"Text1\" type=\"text\" value=\"\" /></td>   
      </tr>";
}//for

«o¤£·|°µ§R°£ªºµ{¦¡

¥i¥H³o¼Ë°µ¶Ü?
<?php
include("mysql_connect.inc.php");

$id = $_SESSION['member_account'];

$sqllove = "SELECT h. * , l.note
                   FROM mylove l, house h
                   WHERE l.houseAddress = h.houseAddress ";

$resultlove = mysql_query($sqllove);
?>
<body>
<?php

While($myrowlove = mysql_fetch_row($resultlove))
{

$sql=delete $myrowlove[0],$myrowlove[9],$myrowlove[4],$myrowlove[7],$myrowlove[6] from mylove ;

}

?>
$myrowlove =mysql_query($sql);

</body>

¦ü¥G¤£¦æ
¦ý¤S·Q¤£¥X

TOP

  1. delete from mylove where Äæ¦ì¦W in [Äæ¦ì­È]  
½Æ»s¥N½X
§Aªí³æ¤¤ªºCHECKBOX¬°¦ó¨S¦³«ü©w­È?
¤ß¦w¡A¥­¦w   
µoªí¥ô¦óµL·N¸qªº·PÁ©ÎÄé¤ô¤å³¹¤@«ß¬å,¬Ã±¤±b¸¹,½Ð¸Ô¾\ª©³W!!

TOP

        ÀR«ä¦Û¦b : ¤£©È¨Æ¦h¡A¥u©È¦h¨Æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD