<?PHP
$sql = "SELECT * FROM users WHERE user_id = '$seller' order by id asc";
$result = mysql_query($sql);
$datas=mysql_fetch_array($result);{
$username = stripslashes(str_replace('\r\n', '<br>',($datas['username'])));
}
?>
ระหว่างกลางไม่ได้หรอครับ
Code (PHP)
<?PHP
$reload = $_SERVER['PHP_SELF']."?update_to=".$_GET['update_to'];
$rpp = 20; // results per page
$adjacents = 4;
$page = intval($_GET["page"]);
if(!$page) $page = 1;
$sql="SELECT * FROM payments LEFT JOIN host_details ON payments.id=host_details.id
LEFT JOIN billing_details ON host_details.id=billing_details.id
WHERE payments.buyer = '$user_id' AND payments.payment_status = 'Completed' AND billing_details.type = 'details' order by $_GET[update_to] ";
$result = mysql_query($sql);
$tcount = mysql_num_rows($result);
$tpages = ($tcount) ? ceil($tcount/$rpp) : 1;
$count = 0;
$i = ($page-1)*$rpp;
?>
<ul class="item-list">
<?PHP
$number = 0;
while(($count<$rpp) && ($i<$tcount))
{
$number++;
mysql_data_seek($result,$i);
$datas=mysql_fetch_array($result);
{
$id_payment = stripslashes(str_replace('\r\n', '<br>',($datas['id_payment'])));
$seller = stripslashes(str_replace('\r\n', '<br>',($datas['seller'])));
$img_path = stripslashes(str_replace('\r\n', '<br>',($datas['img_path'])));
?>
<?PHP
$sql = "SELECT * FROM users WHERE user_id = '$seller' order by id asc";
$result = mysql_query($sql);
$datas=mysql_fetch_array($result);{
$username = stripslashes(str_replace('\r\n', '<br>',($datas['username'])));
}
?>
<?PHP echo $username; ?>
<?PHP
}
$i++;
$count++;
}
?>
$sql="SELECT payments.* , details.* , billing_details.* FROM payments
LEFT JOIN details ON payments.id=details.id
LEFT JOIN billing_details ON details.id=billing_details.id
WHERE payments.buyer = '$user_id' AND payments.payment_status = 'Completed' order by $_GET[update_to] ";
<?PHP
$sql = "SELECT * FROM users WHERE user_id = '$seller' order by id asc";
$result = mysql_query($sql);
$datas=mysql_fetch_array($result);{
$username = stripslashes(str_replace('\r\n', '<br>',($datas['username'])));
}
?>
แทรกเข้าไปในโค๊ด จะเหลือข้อมูลแสดงอันเดียวน่ะครับ
Date :
2013-10-02 18:55:09
By :
หมู
No. 4
Guest
คือตอนโค๊ดปกติก็ยังเรียกข้อมูลได้ปกติครับ
แต่พอเอาโค๊ดนี้มาใส่
Code (PHP)
<?PHP
$sql = "SELECT * FROM users WHERE user_id = '$seller' order by id asc";
$result = mysql_query($sql);
$datas=mysql_fetch_array($result);{
$username = stripslashes(str_replace('\r\n', '<br>',($datas['username'])));
}
?>