Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > PHP > PHP Forum > อยากแทรกการแจ้งเตือนค้นหาข้อมูลไม่พบค่ะ รบกวนหน่อยนะคะทำโปรเจคจบค่ะ



 

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

 



Topic : 112612



โพสกระทู้ ( 27 )
บทความ ( 0 )



สถานะออฟไลน์




อยากแทรกการแจ้งเตือนค้นหาข้อมูลไม่พบ ควรใส่โค้ดส่วนไหนค่ะ รบกวนช่วยดูให้หน่อยนะคะ Code (PHP)
<?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>






Tag : PHP, MySQL, HTML/CSS, JavaScript, Ajax







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2014-11-17 13:39:54 By : jibb View : 933 Reply : 1
 

 

No. 1



โพสกระทู้ ( 73 )
บทความ ( 0 )



สถานะออฟไลน์


Code (PHP)
$totalp = mysql_num_rows($Query);


นี่เลย เท่ากับ 0 ก็แสดงว่าไม่มีข้อมูลที่ค้นหาครับ






แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-11-17 14:10:05 By : armdbz
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : อยากแทรกการแจ้งเตือนค้นหาข้อมูลไม่พบค่ะ รบกวนหน่อยนะคะทำโปรเจคจบค่ะ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 00
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่