รายละเอียดของการตอบ ::
... ถ้าคำสั่ง sql ผิดทำไหม ตัวอื่นเถืงลบ หลื edit ได้คะ
ตัวย่าง :มี ฟีล 3 ฟีล
1.....aaa
2.....bbb
3.....ccc\ ทำไหมฟีลที่ 1กับ 2เภีง ลบ หลื แก้ใขได้คะ เพาะมันไม่มี เคื่องหมาย \
แต่ 3 นี้คะ ลบก็ไม่ได้ แก้ไขก็ไม่ได้คะ
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<?
$objConnect = mysql_connect("localhost","root","root") or die("Error Connect to Database");
$objDB = mysql_select_db("mydatabase");
mysql_query("SET NAMES UTF8");
$strSQL = "SELECT * FROM shortcode order by ShortcodeName DESC ";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
?>
<table width="1500" border="1" align="center" cellpadding="1" cellspacing="0">
<tr>
<td height="40" colspan="50" align="center" bgcolor="#CCCCCC">ສະຫຼຸບການນຳໃຊ້ Short Code ໃນເດືອນ 01 ປີ 2012</td>
</tr>
<tr> <B>
<th width="38" bgcolor="#999999" bordercolor="#006666"><font size="3"><div align="center">No</div></font></th>
<th width="200" bgcolor="#999999" bordercolor="#006666"><font size="3"><div align="center">Shortcode</div></font></th>
<th width="186" bgcolor="#999999" bordercolor="#006666"><font size="3"> <div align="center">ຊື່ບໍລິສັດ</div></font></th>
<th width="45" bgcolor="#999999" bordercolor="#006666"><font size="3"> <div align="center">ເລີ່ມຕົ້ນ</div></font></th>
<th width="103" bgcolor="#999999" bordercolor="#006666"><font size="3"> <div align="center">ໝົດອາຍຸ</div></font></th>
<th width="103" bgcolor="#999999" bordercolor="#006666"><font size="3"><div align="center">ສັນຍາເລກທີ</div></font></th>
<th width="103" bgcolor="#999999" bordercolor="#006666"><font size="3"><div align="center">ລາຄາ/sms</div></font></th>
<th width="103" bgcolor="#999999" bordercolor="#006666"><font size="3"><div align="center">ອາກອນ</div></font></th>
<th width="103" bgcolor="#999999" bordercolor="#006666"><font size="3"><div align="center">ສ່ວນແບ່ງ ETL</div></font></th>
<th width="103" bgcolor="#999999" bordercolor="#006666"><font size="3"><div align="center">ສ່ວນແບ່ງ Partner</div></font></th>
<th width="103" bgcolor="#999999" bordercolor="#006666"><font size="3"><div align="center">ເບີຕິດຕໍ່</div></font></th>
<th width="103" bgcolor="#999999" bordercolor="#006666"><font size="3"> <div align="center">ໝາຍເຫດ</div></font></th>
<th width="117" bgcolor="#999999" bordercolor="#006666"><font size="2"> <div align="center">Delete</div></font></th>
<th width="129" bgcolor="#999999" bordercolor="#006666"><font size="2"> <div align="center">Edit</div></font></th>
</B></tr>
<?
$x = 0;
while($objResult = mysql_fetch_array($objQuery))
{
$x =$x+1;
if($bg =="#CCFF99")
{
$bg = "#FFFFCC";
}
else
{
$bg = "#CCFF99";
}
?>
<tr bgcolor="<?=$bg;?>">
<td height="23"><div align="center"><? echo "$x";?></div></td>
<td><div align="center"><?=$objResult["ShortcodeName"];?></div></td>
<td><div align="center"><?=$objResult["Company"];?></div></td>
<td><div align="center"><?=$objResult["Effect_time"];?></div></td>
<td><div align="center"><?=$objResult["Expire_time"];?></div></td>
<td><div align="center"><?=$objResult["Reference"];?></div></td>
<td><div align="center"><?=$objResult["Price"];?></div></td>
<td><div align="center"><?=$objResult["Tax"];?></div></td>
<td><div align="center"><?=$objResult["Share_ETL"];?></div></td>
<td><div align="center"><?=$objResult["Share_partner"];?></div></td>
<td align="center"><?=$objResult["Tel"];?></td>
<td><div align="center"><?=$objResult["Note"];?></div></td>
<td align="center"><a href="JavaScript:if(confirm('Confirm Delete?')==true){window.location='phpMySQLDeleteRecord.php?ShortID=<?=$objResult["ShortcodeName"];?>';}">Delete</a></td>
<td align="center" ><a href="phpMySQLEditRecordForm.php?ShortID=<?=$objResult["ShortcodeName"];?>">Edit</a></td>
</tr>
<?
}
?>
</table>
</form>
<?
mysql_close($objConnect);
?>
</body>
</html>.