|
 |
|
code error บอกว่า .Error Query [SELECT * FROM user WHERE user_id = .......ช่วยทีค่ะ หามาตั้งหลาย ชม.เเล้ว |
|
 |
|
|
 |
 |
|
Code (PHP)
//แก้แบบบ้านๆนะครับ
<? include "headlog.php" ?>
<?
include "connect.php";
$strSQL1 = "SELECT * FROM user u,deposit d WHERE u.user_id=d.user_id";
$objQuery1 = mysql_query($strSQL1) or die ("Error Query [".$strSQL1."]");
$rs=mysql_fetch_array($objQuery1);
?>
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" type="text/css" href="main_style.css">
<div class="warp" >
<body>
<div class="warp" >
<div class="body" >
<div id="left_block">
<p style=" clear:both;margin:10px 0 0;">
<div class="manu_list" style="margin-top:1px;">
<td colspan="2"><img src="images/menu.gif" width="220" height="30" /></td>
<a href="authdepindex.php">หน้าแรก</a>
<a href="authdepprofile">ข้อมูลส่วนตัว</a>
<a href="authdepmem">จัดการข้อมูลสมาชิก</a>
<a href="authdepitem">จัดการข้อมูลเงินฝ่าก</a>
<a href="authdepdiv">คำนวณเงินปันผล</a>
<a href="authdeppaydiv">ข้อมูลการจ่ายเงินปันผล</a>
<a href="authnews">จัดการข้อมูลข่าวประชาสัมพันธ์</a>
<a href="logout.php">ออกจากระบบ</a>
</div>
</p>
</div>
<font size="18" color="#993300"><b><center> เพิ่มจำนวนเงินฝาก </center></b></font>
<p>
<table cellpadding="0" cellspacing="0" width="70%" border="0" align="center">
<tr align="right">
<td width="5%" valign="bottom">
<input type="image" id="new" name="บันทึกข้อมูล" width="40" height="40" src="images/add.png" alt="บันทึกข้อมูล"/> <br/>
<a href="depositformadd.php?user_id=<?=$rs['user_id']?>">เพิ่มจำนวนเงินฝาก</a>
</td>
</tr>
</table>
<p>
<table width="70%" border="1" align="center" cellpadding="1" cellspacing="0" bordercolor="#000066">
<tr bgcolor="#99ffff">
<th width="10%">ลำดับที่</th>
<th width="15%">หมายเลขบัญชี</th>
<th width="25%">ชื่อสมาชิก</th>
<th width="25%">วันที่/เวลา</th>
<th width="10%" >ฝากเงิน</th>
<th width="20%">คำสั่ง</th>
</tr>
<?
$strSQL = "SELECT * FROM user u,deposit d WHERE u.user_id=d.user_id";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
while($objResult = mysql_fetch_array($objQuery))
{
$fname = $objResult['prefix_name'].$objResult['fname']." ".$objResult['lname'];
$i++;
if($i%2==0)
{
$bg = "#ccffcc";
}
else
{
$bg = "#FFFFFF";
}
?>
<tr bgcolor="<?=$bg;?>">
<td align="center"><? echo $i++; ?></td>
<td align="center" ><?=$objResult["user_id"];?></td>
<td align="center"><?=$objResult["prefixname"];?>
<?=$objResult["fname"];?>
<?=$objResult["lname"];?></td>
<td align="center"><?=$objResult["dep_date"];?>
|
<?=$objResult["dep_time"];?></td>
<td align="center"><?=$objResult["dep_mount"];?></td>
<?
$dep_total = $dep_total + $objResult['dep_mount'];
?>
<td align="center"><A href="printdep.user_id='user_id'&dep=<?=$objResult["dep_id"];?>">พิมพ์ใบฝากเงิน</a></td>
</tr>
<?
}
?>
<tr class="row<?=$i%2?>">
<td colspan="6" align="right"class="topic_detail">ยอดรวมเงินสะสม = <?=$dep_total?> บาท </td>
</tr>
</table>
|
 |
 |
 |
 |
Date :
2012-02-22 18:39:36 |
By :
Manussawin |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|

ในช่อง url เจอ user_id ค่ะ แต่ยังขึ้นเหมือนในรูป
|
ประวัติการแก้ไข 2012-02-22 18:57:25
 |
 |
 |
 |
Date :
2012-02-22 18:55:44 |
By :
lookpla26 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ใช้ $_GET["uID"] เพื่อรับค่า ตัวแปร uID
แต่ตัวแปรที่ส่งผ่าน url เป็น user_id
มันก็ไม่แปลกหรอกครับ ที่ใช้ $_GET["uID"] แล้วได้เป็นค่าว่าง
|
 |
 |
 |
 |
Date :
2012-02-22 20:26:19 |
By :
Likito |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 02
|