อยากแทรกการแจ้งเตือนค้นหาข้อมูลไม่พบค่ะ รบกวนหน่อยนะคะ

ถาม-ตอบ แนะนำไอเดียว โค้ดตัวอย่าง แนวทาง วิธีแก้ปัญหา อยากแทรกการแจ้งเตือนค้นหาข้อมูลไม่พบค่ะ รบกวนหน่อยนะคะ

อยากแทรกการแจ้งเตือนค้นหาข้อมูลไม่พบค่ะ รบกวนหน่อยนะคะ

<?php require_once('../Connections/Myconnect.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$colname_Recordset2 = "-1";
if (isset($_POST['word'])) {
  $colname_Recordset2 = $_POST['word'];
}
mysql_select_db($database_Myconnect, $Myconnect);
$query_Recordset2 = sprintf("SELECT n_credit, id_credit, titlename, name, lastname FROM customer WHERE n_credit LIKE %s", GetSQLValueString("%" . $colname_Recordset2 . "%", "text"));
$Recordset2 = mysql_query($query_Recordset2, $Myconnect) or die(mysql_error());
$row_Recordset2 = mysql_fetch_assoc($Recordset2);
$totalRows_Recordset2 = mysql_num_rows($Recordset2);
?>
<!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>search_user</title>
</head>

<body background="bg.jpg" >
<?php require('topmenu.css');?>
<script language="JavaScript">
	function onDelete()
	{
		if(confirm('Do you want to delete ?')==true)
		{
			return true;
		}
		else
		{
			return false;
		}
	}
</script>
<form name="frmMain" action="search_user.php" method="post" OnSubmit="return onDelete();">
<center>
<br />
  <table width="1229" height="152" border="0">
  <tr>
    <td width="1223" height="135"  border="0"><center>
      <img src="GSB_Logo.png" width="452" height="158" />
    </center></td>
  </tr>
  </table>
   
  <table width="1228" height="31" border="0">
    <tr>
      <td width="705" height="25" >
        <font color="#FFFFFF"> <form action=" " method="post"  autocomplete="on">
        <div id="headBottom">
         
<div id="topmenu">
  <ul>
    <li><a href="index_user.php"><span>หน้าแรก</span></a> 
        <a href="Account Summary.php"><span>เพิ่มบัญชีลูกค้า</span></a> 
        <a href="edit account.php"><span>แก้ไขบัญชีลูกค้า</span></a> 
        <a href="search_user.php"><span>ค้นหาแฟ้มงาน</span></a> 
        <a href="seeall_user.php"><span>ดูแฟ้มงานทั้งหมด</span></a> 
        <a href="contact.php"><span>แก้ไขข้อมูลส่วนตัว</span></a> 
        </li>
  </ul>
</div>
<div class="bttnCheck"></div>
        </div>
      </form><font color="#333333">
        <div align="right" size="16">ยินดีต้อนรับ:<font color="#6633CC"><? echo $_SESSION["user"];?></font>&nbsp;<a href="login.php">Logout</a></div>
        </tr>
    </td></table>
  
  <table width="1234" border="0">
    <tr>
      <td height="407" align="center" valign="top" bgcolor="#FFFFFF">
      
      <br />
      <table width="1228" border="0">
        <tr>
          <td width="1234" height="407" align="center" valign="top" bgcolor="#FFFFFF"><center>
            <p>
              <?  if($submit=="" or $show=="OK"){?>
              <center>
            </p>
            <center>
              <form action="search_user.php?show=OK&amp;strSearch=Y" method="post" name="form1" id="form1">
                <table width="98%" >
                  <tr>
                    <td width="50%"><div align="right">ค้นหา :
                      <select name="Search2">
                        <option value="n_credit" <? if($Search2=="n_credit"){ ?>selected<? }?>>ประเภทสินเชื่อ</option>
                        <option value="id_credit" <? if($Search2=="id_credit"){ ?>selected<? }?>>เลขที่บัญชี</option>
                        <option value="idcard" <? if($Search2=="idcard"){ ?>selected<? }?>>เลขบัตรประชาชน</option>
                        <option value="name" <? if($Search2=="name"){ ?>selected<? }?>>ชื่อ</option>
                      </select>
                    </div></td>
                    <td width="64%"><input name="Search" type="text" size="20" value="<? echo $Search?>"onfocus="this.value = '';" />
                      <input type="submit" name="submit" value="Search" /></td>
                  </tr>
                </table>
              </form>
            </center>
            <p>
              <?
if(!isset($start)){
$start = 0;
$page=1;
}
$limit = '10';

if($strSearch=="Y"){
$Qtotal = mysql_query("select * from customer Where ".$Search2." like '%".$Search."%'  ");
}else{
$Qtotal = mysql_query("select * from customer");
}

$total = mysql_num_rows($Qtotal); 
if($strSearch=="Y"){
$Query = mysql_query("select * from customer Where ".$Search2." like '%".$Search."%'   order  by  id_credit DESC LIMIT $start,$limit");
}else{
$Query= mysql_query("select * from customer order  by id_credit DESC LIMIT $start,$limit");
}

echo "ระบบสารสนเทศการติดตามหนี้ของแผนกสินเชื่อ  ธนาคารออมสิน  สาขาปฐมพร";
$totalp = mysql_num_rows($Query);
$xx=$totalp+$start;
$yy=$start+1;

?>
              <br />
            </p>
            <table width="87%" height="64">
              <tr bgcolor="#666699" height='40' >
                <td width="16%" align='center'><strong><font color="#FFFFFF">ประเภทสินเชื่อ</font></strong></td>
                <td width="15%" align='center'><strong><font color="#FFFFFF">เลขที่บัญชี</font></strong></td>
                <td width="17%" align='center'><strong><font color="#FFFFFF">เลขบัตรประชาชน</font></strong></td>
                <td width="11%" align='center'><strong><font color="#FFFFFF">คำนำหน้าชื่อ</font></strong></td>
                <td width="19%" align='center'><strong><font color="#FFFFFF">ชื่อ</font></strong></td>
                <td width="17%" align='center'><strong><font color="#FFFFFF">นามสกุล</font></strong></td>
                <td width="5%" align='center'><strong><font color="#FFFFFF">รายงาน</font></strong></td>
              </tr>
              <?
while($arr = mysql_fetch_array($Query)){
$autoid = $arr['id_credit'];
$i++;
if($i%2==0){
$bg = "#CCCCCC";
}else{
$bg = "#CCCCCC";
}
?>
              <tr bgcolor="<? echo $bg?>" onmouseover="this.style.backgroundColor='#BEBEE9'" onmouseout="this.style.backgroundColor=''" valign="top">
                <td align='left' valign="middle"><? echo $arr['n_credit'] ?></td>
                <td align='center' valign="middle"><? echo $arr['id_credit'] ?></td>
                <td align='center' valign="middle"><? echo $arr['idcard'] ?></td>
                <td align='center' valign="middle"><? echo $arr['titlename'] ?></td>
                <td align='center' valign="middle"><? echo $arr['name'] ?></td>
                <td width="17%" align='center' valign="middle"><? echo $arr['lastname'] ?></td>
                <td width="5%" align='left' valign="middle" bgcolor="#FFFFFF"><a href="report.php?id_credit=<?php echo $arr['id_credit']; ?>" ><img src="report.png" width="37" height="28" /></td>
              </tr>
              <? }?>
            </table>
            <p>
              <? }?>
              
            </p>
            <p> <input name="input" type="button" value="สั่งพิมพ์" onclick="window.print();" />
            </p>
          </center></td>
        </tr>
      </table>
      <table width="1225" height="31" border="0">
    <tr>
      <td width="1226" height="1" bgcolor="#6666CC">
      </td>
    </tr>
  </table>
      </body>
</html>


อยากแทรกการแจ้งเตือนค้นหาข้อมูลไม่พบ ควรใส่โค้ดส่วนไหนค่ะ รบกวนช่วยดูให้หน่อยนะคะ



Only 171.5.250.xxx 17-11-2014 18:29:33

คำแนะนำ และการใช้งาน

สมาชิก กรุณา ล็อกอินเข้าระบบ เพื่อตั้งคำถามใหม่ หรือ ตอบคำถาม สมาชิกใหม่ สมัครสมาชิกได้ที่ สมัครสมาชิก


  • ถาม-ตอบ กรุณา ล็อกอินเข้าระบบ
  • เปลี่ยน


    ( หรือ เข้าใช้งานผ่าน Social Login )

 ความคิดเห็นที่ 1
            ...........
               <td width="5%" align='center'><strong><font color="#FFFFFF">รายงาน</font></strong></td>  
              </tr>  
              <?php if($totalp>0){ ?>
              <?
while($arr = mysql_fetch_array($Query)){
$autoid = $arr['id_credit'];
$i++;
if($i%2==0){
$bg = "#CCCCCC";
}else{
$bg = "#CCCCCC";
}
?>
              <tr bgcolor="<? echo $bg?>" onmouseover="this.style.backgroundColor='#BEBEE9'" onmouseout="this.style.backgroundColor=''" valign="top">
                <td align='left' valign="middle"><? echo $arr['n_credit'] ?></td>
                <td align='center' valign="middle"><? echo $arr['id_credit'] ?></td>
                <td align='center' valign="middle"><? echo $arr['idcard'] ?></td>
                <td align='center' valign="middle"><? echo $arr['titlename'] ?></td>
                <td align='center' valign="middle"><? echo $arr['name'] ?></td>
                <td width="17%" align='center' valign="middle"><? echo $arr['lastname'] ?></td>
                <td width="5%" align='left' valign="middle" bgcolor="#FFFFFF"><a href="report.php?id_credit=<?php echo $arr['id_credit']; ?>" ><img src="report.png" width="37" height="28" /></td>
              </tr>
              <? }?>
              <?php }else{?>
              <tr>
                  <td colspan="7">ไม่พบข้อมูล</td>
              </tr>
              <?php } ?>
              </table>  
              .....


ninenik 1.47.82.xxx 17-11-2014
 ความคิดเห็นที่ 2
Ninenik IP ยังไม่ขึ้นเลยอะค่ะ


only 101.109.66.xxx 17-11-2014 20:56
 ความคิดเห็นที่ 3
เราต้องไล่โครงสร้างเอง ให้ดูเป็นแนวทาง การวางโค้ดเท่านั้น
เพราะต้องปรับไปตามรูปแบบที่ใช้จริง  ตัวทีแนะนำจะแสดงเมื่อไม่มีข้อมูล


ninenik 1.47.82.xxx 17-11-2014
1






เว็บไซต์ของเราให้บริการเนื้อหาบทความสำหรับนักพัฒนา โดยพึ่งพารายได้เล็กน้อยจากการแสดงโฆษณา โปรดสนับสนุนเว็บไซต์ของเราด้วยการปิดการใช้งานตัวปิดกั้นโฆษณา (Disable Ads Blocker) ขอบคุณครับ