|
|
|
Mysql Error #1136 อันเนื่องมาจากข้อมูลไม่ตรงกับฐานข้อมูล ทั้งที่มันตรงกัน ตาดีๆช่วยดูทีครับ ด่วนมากมาย |
|
|
|
|
|
|
|
Code
INSERT INTO tb_customer (cus_id, id_card, cus_user, cus_pass, title_id, cus_name, cus_surname, cus_addr, cus_brith, cus_tel, cus_img, org_name, org_id, date_reg, date_last, sta_id) values ( '' , '111', 'aaa', 'aaa', '2', 'aaa', 'aaa', 'aaa', '2010-10-10', '111', 'aaa.jpg' 'aaa', '111', '2010-11-16 19:17:09', '2010-11-16 19:17:09', '0' ) ;
ช่วยทีนะครับ
Tag : PHP, MySQL, HTML/CSS, JavaScript, CakePHP
|
|
|
|
|
|
Date :
2010-11-16 19:31:44 |
By :
golderboy |
View :
4692 |
Reply :
7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ลองใช้ mysql_query($strSQL) or die(mysql_error()); ดูครับ
|
|
|
|
|
Date :
2010-11-16 20:11:15 |
By :
webmaster |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
มันก็ฟ้องเหมือนเดิมครับ "Column count doesn't match value count at row 1"
นี้ลายชื่อคอลัมครับ // cus_id id_card cus_user cus_pass title_id cus_name cus_surname cus_addr cus_brith cus_tel cus_img org_name org_id date_reg date_last sta_id
|
|
|
|
|
Date :
2010-11-16 21:42:35 |
By :
golderboy |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ขอบใจครับ ช่วงนี้งานเยอะเลยเบอลๆ แว่นก็หายอีก เพ่งกระแสจิตมองตั้งนาน ขอบคุณครับ
|
|
|
|
|
Date :
2010-11-16 21:52:48 |
By :
golderboy |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (PHP)
<?php
include "include/connectionDb.php";
include "include/function.php";
$strMode = $_POST["qMode"];
$detail= rudeword($_POST['qDetail']);
$title = $_POST['qTitle'];
$name = $_POST['qName'];
$strPage=$_POST['page'];
if($strMode == "ADD")
{
$sql = "INSERT INTO tbl_question VALUES (0, '$title', '$detail', '$name', NOW(), 0)";
@mysql_query($sql) or die(mysql_error());
}
$sql = "SELECT * ,DATE_FORMAT(date_ques, '%d-%m-%Y') AS dateques FROM tbl_question";
$result = @mysql_query($sql) or die(mysql_error());
$Num_Rows=mysql_num_rows($result);
$Per_Page=3;
$Page=$strPage;
if(!$strPage) {
$Page=1;
}
$Prev_Page=$Page-1;
$Next_Page=$Page+1;
$Page_Start=(($Per_Page*$Page)-$Per_Page);
if($Num_Rows<=$Per_Page) {
$Num_Pages=1;
} else if (($Num_Rows % $Per_Page)==0) {
$Num_Pages=($Num_Rows/$Per_Page);
} else {
$Num_Pages=($Num_Rows/$Per_Page)+1;
$Num_Pages=(int)$Num_Pages;
}
$sql.=" ORDER BY ques_id DESC LIMIT $Page_Start , $Per_Page";
$result = @mysql_query($sql) or die(mysql_error());
?>
<table width="600" border="0" cellspacing="2" cellpadding="2" align="left">
<tr bgcolor="#66CCFF">
<td width="14%" align="center">ໝາຍເລກ</td>
<td width="38%" align="center">ຫົວຂໍ້</td>
<td width="18%" align="center">ໂດຍ</td>
<td width="19%" align="center">ເມື່ອວັນທີ</td>
<td width="11%" align="center">ເບິ່ງ</td>
<td width="11%" align="center">ຕອບ</td>
</tr>
<?
while ($data = mysql_fetch_array($result)) {
$LoopRow++;
$bgColor1 = "#FFFFFF";
$bgColor2 = "#ddeeff";
$bgColor = (($LoopRow%2) == 0)? $bgColor2 : $bgColor1;
$quesid = $data['ques_id'];
$qtitle = $data['title'];
$qdetail = nl2br(htmlspecialchars($data['detail']));
$qname = $data['name'];
$dateques = $data['dateques'];
$numview = $data['view'];
$up = $data['up'];
$strSql = "SELECT COUNT(*) AS numreply FROM tbl_answer WHERE ref_ques_id='$quesid'";
$strResult = mysql_query($strSql);
$data = mysql_fetch_array($strResult);
$numreply = $data['numreply'];
?>
<tr bgcolor="<?=$bgColor;?>">
<td align="center"><?=$quesid;?></td>
<td><a href="answer.php?qid=<?=$quesid;?>" target="_blank"><?=$qtitle;?></a></td>
<td><?=$qname;?></td>
<td align="center"><?=$dateques;?></td>
<td align="center"><?=$numview;?></td>
<td align="center"><?=$numreply;?></td>
</tr>
<?
}
?>
<tr bgcolor="#66CCFF">
<td align="center" colspan="6">
<?
if($Prev_Page) {
echo " <a href=\"JavaScript:doAdd('$Prev_Page')\"><< Back</a> ";
}
for($i=1;$i<=$Num_Pages; $i++){
if($i!=$Page) {
echo "[ <a href=\"JavaScript:doAdd('$i')\">$i</a> ]";
} else {
echo "<b> ໜ້າ $i </b>";
}
}
if($Page!=$Num_Pages) {
echo " <a href=\"JavaScript:doAdd('$Next_Page')\">Next >></a> ";
}
?>
</td>
</tr>
</table>
<?
mysql_close($objConnect);
?>
|
|
|
|
|
Date :
2012-06-08 14:33:24 |
By :
kopss |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mr.win
ช่วยทีนะครับ
Column count doesn't match value count at row 1
|
|
|
|
|
Date :
2012-06-08 14:36:31 |
By :
kopss |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 00
|