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 > Error Save [INSERT INTO resume ( Res_IDPersonnel, Res_Prefix, Res_Names, Res_lastname, Res_Names_Eng, Res_Ldentitycode, Res_Blood, Res_NickName, Res_S



 

Error Save [INSERT INTO resume ( Res_IDPersonnel, Res_Prefix, Res_Names, Res_lastname, Res_Names_Eng, Res_Ldentitycode, Res_Blood, Res_NickName, Res_S

 



Topic : 086562

Guest




พอ บันทึกแล้วมันขึ้น มีวิธีแก้ป่าวครับ มือใหม๋ ครับ

Code
Error Save [INSERT INTO resume ( Res_IDPersonnel, Res_Prefix, Res_Names, Res_lastname, Res_Names_Eng, Res_Ldentitycode, Res_Blood, Res_NickName, Res_Sex, Res_Tel, Res_Email, Res_Birthday, Res_Address, Dis_DistrictID, Res_PostalCode, Bel_BelongID, Res_Duty, Res_DayOperations, Res_Salary, Bos_BossID, Res_IDTheDriver, Res_Educational, Res_Emergency, Res_Father, Res_TelFather, Res_Mather, Res_TelMather, Vac_VacationID, Lae_LaeveID, Rig_RightID, Group, Cal_ID) VALUES ('','','' ,'','','' ,'','','' ,'','','' ,'','','' ,'','','' ,'','','' ,'','','' ,'','','' ,'','','' ,'','') ]




Tag : PHP, MySQL







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2012-11-11 19:21:33 By : Nom View : 850 Reply : 3
 

 

No. 1



โพสกระทู้ ( 5,146 )
บทความ ( 26 )

สมาชิกที่ใส่เสื้อไทยครีเอท Hall of Fame 2012

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


มันบันทึกไม่ลง ฐานข้อมูล น่ะครับ เอาโค้ดมาลงดีกว่าครับ จะได้ช่วยแก้ไขถูก






แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-11-11 20:08:30 By : deawx
 


 

No. 2



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

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

เหมือนกับว่าค่ามันว่าง ลองใช้ or die (mysql_error()); แทนครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-11-12 08:55:02 By : mr.win
 

 

No. 3



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



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


นี้ครับ Code ทั้งหมด


<?php
$hostname = "localhost";
$username = "root";
$password = "1234";
$dbname = "db_system";

$Config = mysql_connect( $hostname, $username, $password );
if ( ! $Config )
die ( "ไม่สามารถติดต่อกับ MySQL ได้" );

mysql_select_db ($dbname,$Config)
or die ( "ไม่สามารถเลือกฐานข้อมูล db_system ได้" );

if ($_REQUEST['Save1']= "บันทึก")
$objConnect = mysql_connect("localhost","root","1234") or die("Error Connect to Database");
$objDB = mysql_select_db("db_system");
$strSQL = "INSERT INTO resume ";
$strSQL .="( Res_IDPersonnel, Res_Prefix, Res_Names, Res_lastname, Res_Names_Eng,
Res_Ldentitycode, Res_Blood, Res_NickName, Res_Sex, Res_Tel, Res_Email, Res_Birthday, Res_Address, Dis_DistrictID, Res_PostalCode,
Bel_BelongID, Res_Duty, Res_DayOperations, Res_Salary, Bos_BossID, Res_IDTheDriver, Res_Educational, Res_Emergency, Res_Father,
Res_TelFather, Res_Mather, Res_TelMather, Vac_VacationID, Lae_LaeveID, Rig_RightID, Group, Cal_ID) ";
$strSQL .="VALUES ";
$strSQL .="('".$_POST["txtRes_IDPersonnel"]. "','" .$_POST["txtRes_Prefix"]. "','" .$_POST["txtRes_Names"]. "' ";
$strSQL .=",'" .$_POST["txtRes_lastname"]. "','" .$_POST["txtRes_Names_Eng"]. "','" .$_POST["txtRes_Ldentitycode"]. "' ";
$strSQL .=",'" .$_POST["txtRes_Blood"]. "','" .$_POST["txtRes_NickName"]. "','" .$_POST["txtRes_Sex"]. "' ";
$strSQL .=",'" .$_POST["txtRes_Tel"]. "','" .$_POST["txtRes_Email"]. "','" .$_POST["txtRes_Birthday"]. "' ";
$strSQL .=",'" .$_POST["txtRes_Address"]. "','" .$_POST["txtDis_DistrictID"]. "','" .$_POST["txtRes_PostalCode"]. "' ";
$strSQL .=",'" .$_POST["txtBel_BelongID"]. "','" .$_POST["txtRes_Duty"]. "','" .$_POST["txtRes_DayOperations"]. "' ";
$strSQL .=",'" .$_POST["txtRes_Salary"]. "','" .$_POST["txtBos_BossID"]. "','" .$_POST["txtRes_IDTheDriver"]."' ";
$strSQL .=",'" .$_POST["txtRes_Educational"]."','".$_POST["txtRes_Emergency"]. "','" .$_POST["txtRes_Father"]."' ";
$strSQL .=",'" .$_POST["txtRes_TelFather"]. "','" .$_POST["txtRes_Mather"]. "','" .$_POST["txtRes_TelMather"]."' ";
$strSQL .=",'".$_POST["txtVac_VacationID"]."','".$_POST["txtLae_LaeveID"]."','".$_POST["txtRig_RightID"]."' ";
$strSQL .=",'".$_POST["txtGroup"]."','".$_POST["txtCal_ID"]."') ";
$objQuery = mysql_query($strSQL);
if($objQuery)
{
echo "Save Done.";
}
else
{
echo "Error Save [".$strSQL."]";
}
mysql_close($objConnect);
?>
<!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=windows-874" />
<title>ข้อมูลส่วนตัว</title>
</head>

<body>
<form action="resume" name="frmAdd" method="post">
<body bgcolor="#0099FF">
<table width="903" border="0" align="center" cellpadding="0">
<tr>
<td height="125" colspan="2">&nbsp;</td>
</tr>
<tr>
<td><font size="3" face="Tahoma, MS Sans Serif"><strong>รหัสประจำพนักงาน</strong></font></td>
<td><input type="text" name="txtRes_IDPersonnel" size="50" id="txtRes_IDPersonnel"></td>
</tr>
<tr>
<td><font size="3" face="Tahoma, MS Sans Serif"><strong>คำนำหน้า </strong></font></td>
<td><input type="text" name="txtRes_Prefix" size="20" id="txtRes_Prefix"></td>
</tr>
<tr>
<td><font size="3" face="Tahoma, MS Sans Serif"><strong>ชื่อพนักงาน </strong></font></td>
<td><input type="text" name="txtRes_Names" size="20" id="txtRes_Names"></td>
</tr>
<tr>
<td><font size="3" face="Tahoma, MS Sans Serif"><strong>นามสกุลพนักงาน</strong></font></td>
<td><input type="text" name="txtRes_lastname" size="20" id="txtRes_lastname"></td>
</tr>
<tr>
<td><font size="3" face="Tahoma, MS Sans Serif"><strong>ชื่อภาษาอังกฤษ</strong></font></td>
<td><input type="text" name="txtRes_Names_Eng" size="50" id="txtRes_Names_Eng"></td>
</tr>
<tr>
<td><font size="3" face="Tahoma, MS Sans Serif"><strong>รหัสประจำตัวประชาชน</strong></font></td>
<td><input type="text" name="txtRes_Ldentitycode" size="50" id="txtRes_Ldentitycode"></td>
</tr>
<tr>
<td><font size="3" face="Tahoma, MS Sans Serif"><strong>หมู่โลหิต</strong></font></td>
<td><input type="text" name="txtRes_Blood" size="50" id="txtRes_Blood"></td>
</tr>
<tr>
<td><font size="3" face="Tahoma, MS Sans Serif"><strong>ชื่อเล่น</strong></font></td>
<td><input type="text" name="txtRes_NickName" size="50" id="txtRes_NickName"></td>
</tr>

<tr>
<td><font size="3" face="Tahoma, MS Sans Serif"><strong>เพศ</strong></font></td>
<td><input type="text" name="txtRes_Sex" size="50" id="txtRes_Sex"></td>
</tr>
<tr>
<td><font size="3" face="Tahoma, MS Sans Serif"><strong>เบอร์ติดต่อ</strong></font></td>
<td><input type="text" name="txtRes_Tel" size="50" id="txtRes_Tel"></td>
</tr>
<tr>
<td><font size="3" face="Tahoma, MS Sans Serif"><strong>E-Mail</strong></font></td>
<td><input type="text" name="txtRes_Email" size="50" id="txtRes_Email"></td>
</tr>
<tr>
<td><font size="3" face="Tahoma, MS Sans Serif"><strong>วันเกิด</strong></font></td>
<td><input type="text" name="txtRes_Birthday" size="50" id="txtRes_Birthday"></td>
</tr>
<tr>
<td><font size="3" face="Tahoma, MS Sans Serif"><strong>ที่อย</strong></font></td>
<td><input type="text" name="txtRes_Address" size="50" id="txtRes_Address"></td>
</tr>
<tr>
<td><font size="3" face="Tahoma, MS Sans Serif"><strong>ตำบล</strong></font></td>
<td><input type="text" name="txtDis_DistrictID" size="50" id="txtDis_DistrictID"></td>
</tr>
<tr>
<td><font size="3" face="Tahoma, MS Sans Serif"><strong>รหัสไปรษณีย</strong></font></td>
<td><input type="text" name="txtRes_PostalCode" size="50" id="txtRes_PostalCode"></td>
</tr>
<tr>
<td><font size="3" face="Tahoma, MS Sans Serif"><strong>สังกัด</strong></font></td>
<td><input type="text" name="txtBel_BelongID" size="50" id="txtBel_BelongID"></td>
</tr>
<tr>
<td><font size="3" face="Tahoma, MS Sans Serif"><strong>หน้าที่</strong></font></td>
<td><input type="text" name="txtRes_Duty" size="50" id="txtRes_Duty"></td>
</tr>
<tr>
<td><font size="3" face="Tahoma, MS Sans Serif"><strong>วันที่เริ่มปฏิบัติงาน</strong></font></td>
<td><input type="text" name="txtRes_DayOperations" size="50" id="txtRes_DayOperations"></td>
</tr>
<tr>
<td><font size="3" face="Tahoma, MS Sans Serif"><strong>เงินเดือน</strong></font></td>
<td><input type="text" name="txtRes_Salary" size="50" id="txtRes_Salary"></td>
</tr>
<tr>
<td><font size="3" face="Tahoma, MS Sans Serif"><strong>หัวหน้าผู้ควบคุม</strong></font></td>
<td><input type="text" name="txtBos_BossID" size="50" id="txtBos_BossID"></td>
</tr>
<tr>
<td><font size="3" face="Tahoma, MS Sans Serif"><strong>บัตรประจำผู้ขับขี่</strong></font></td>
<td><input type="text" name="txtRes_IDTheDriver" size="50" id="txtRes_IDTheDriver"></td>
</tr>
<tr>
<td><font size="3" face="Tahoma, MS Sans Serif"><strong>วุฒิการศึกษา</strong></font></td>
<td><input type="text" name="txtRes_Educational" size="50" id="txtRes_Educational"></td>
</tr>
<tr>
<td><font size="3" face="Tahoma, MS Sans Serif"><strong>กรณีฉุกเฉินแจ้ง</strong></font></td>
<td><input type="text" name="txtRes_Emergency" size="50" id="txtRes_Emergency"></td>
</tr>
<tr>
<td><font size="3" face="Tahoma, MS Sans Serif"><strong>บิดา</strong></font></td>
<td><input type="text" name="txtRes_Father" size="50" id="txtRes_Father"></td>
</tr>
<tr>
<td><font size="3" face="Tahoma, MS Sans Serif"><strong>เบอร์โทรศัพท์บิดา</strong></font></td>
<td><input type="text" name="txtRes_TelFather" size="50" id="txtRes_TelFather"></td>
</tr>
<tr>
<td><font size="3" face="Tahoma, MS Sans Serif"><strong>มารดา</strong></font></td>
<td><input type="text" name="txtRes_Mather" size="50" id="txtRes_Mather"></td>
</tr>
<tr>
<td><font size="3" face="Tahoma, MS Sans Serif"><strong>เบอร์โทรศัพท์มารดา</strong></font></td>
<td><input type="text" name="txtRes_TelMather" size="50" id="txtRes_TelMather"></td>
</tr>
<tr>
<td><font size="3" face="Tahoma, MS Sans Serif"><strong>ประเภทวันหยุด</strong></font></td>
<td><input type="text" name="txtVac_VacationID" size="50" id="txtVac_VacationID"></td>
</tr>
<tr>
<td><font size="3" face="Tahoma, MS Sans Serif"><strong>ประเภทการลา</strong></font></td>
<td><input type="text" name="txtLae_LaeveID" size="50" id="txtLae_LaeveID"></td>
</tr><tr>
<td><font size="3" face="Tahoma, MS Sans Serif"><strong>การลา</strong></font></td>
<td><input type="text" name="txtRig_RightID" size="50" id="txtRig_RightID"></td>
</tr>
<tr>
<td><font size="3" face="Tahoma, MS Sans Serif"><strong>กลุ่มการลาของพนักงาน</strong></font></td>
<td><input type="text" name="txtGroup" size="50" id="txtGroup"></td>
</tr>
<tr>
<td><font size="3" face="Tahoma, MS Sans Serif"><strong>ปฎิทินการหยุดงาน</strong></font></td>
<td><input type="text" name="txtCal_ID" size="50" id="txtCal_ID" /></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="submit" name="Save1" value="บันทึก" />
<input type="submit" name="Edit1" value="แก้ไข" /></td>
</tr>
</table>
<tr bgcolor="#0099FF">
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</form>
</body>
</html>
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-11-12 09:20:45 By : pongtave
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : Error Save [INSERT INTO resume ( Res_IDPersonnel, Res_Prefix, Res_Names, Res_lastname, Res_Names_Eng, Res_Ldentitycode, Res_Blood, Res_NickName, Res_S
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ 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 05
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 อัตราราคา คลิกที่นี่