รบกวนสอบถามปัญหาเรืองดึงข้อมูลจากdata base ไม่มาครับ แต่ id ของฐานข้อมูลตัวนั้นมาแล้ว
ใน code ที่ให้มา ไม่มีคำสั่ง ตอน query นิครับ
Date :
2013-12-04 19:19:40
By :
FreshyMusiC
query มีน่ะคัรบอันนีโค๊ดเต็มครับ
Code (PHP)
<? session_start(); ?>
<meta http-equiv=Content-Type content="text/html; charset=tis-620">
<?php require('../Connections/db_connect.php'); ?>
<?php
//mysql_select_db($database_db_connect, $db_connect);
if (!isset($HTTP_SESSION_VARS['MEM_USER'])) { $MEM_USER = ""; } else { $MEM_USER = $HTTP_SESSION_VARS['MEM_USER']; }
if (!isset($HTTP_SESSION_VARS['MEM_PASS'])) { $MEM_PASS = ""; } else { $MEM_PASS = $HTTP_SESSION_VARS['MEM_PASS']; }
if (!isset($HTTP_GET_VARS['delete'])) { $delete = ""; } else { $delete = $HTTP_GET_VARS['delete']; }
if (!isset($HTTP_GET_VARS['no'])) { $no = ""; } else { $no = $HTTP_GET_VARS['no']; }
$query_chk_log = "SELECT * FROM admin WHERE username='$MEM_USER' AND password='$MEM_PASS'";
$chk_log = mysql_query($query_chk_log);
$row_chk_log = mysql_fetch_array($chk_log);
$totalRows_chk_log = mysql_num_rows($chk_log);
if($totalRows_chk_log==0) {
//header("location:index.php");
}
?>
<?php require_once('../Connections/db_connect.php'); ?>
<?php
$currentPage = $_SERVER["PHP_SELF"];
$maxRows_member2 = 20;
$pageNum_member2 = 0;
if (isset($_GET['pageNum_member2'])) {
$pageNum_member2 = $_GET['pageNum_member2'];
}
$startRow_member2 = $pageNum_member2 * $maxRows_member2;
//mysql_select_db($database_db_connect, $db_connect);
$query_member2 = "SELECT * FROM member2 WHERE member.id='$id'";
$query_limit_member2 = sprintf("%s LIMIT %d, %d", $query_member2, $startRow_member2, $maxRows_member2);
$member2 = mysql_query($query_limit_member2);
$row_member = mysql_fetch_assoc($member);
if (isset($_GET['totalRows_member2'])) {
$totalRows_member2 = $_GET['totalRows_member2'];
} else {
$all_member2 = mysql_query($query_member2);
$totalRows_member = mysql_num_rows($all_member);
}
$totalPages_member2 = ceil($totalRows_member2/$maxRows_member2)-1;
$queryString_member2 = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_member2") == false &&
stristr($param, "totalRows_member2") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_member2= "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_member2 = sprintf("&totalRows_member2=%d%s", $totalRows_member2, $queryString_member2);
?>
Date :
2013-12-04 19:58:59
By :
itdefent
Code (PHP)
/mysql_select_db($database_db_connect, $db_connect);
$query_member2 = "SELECT * FROM member2 WHERE member.id='$id'";
$query_limit_member2 = sprintf("%s LIMIT %d, %d", $query_member2, $startRow_member2,
Date :
2013-12-05 10:10:34
By :
itdefent
Code (PHP)
/mysql_select_db($database_db_connect, $db_connect);
$query_member2 = "SELECT * FROM member2 WHERE member.id='$id'";
$query_limit_member2 = sprintf("%s LIMIT %d, %d", $query_member2, $startRow_member2,
คำสั่งช่วงนี้ผิดหรือเปล่าครับ รบกวนขอคำแนะนำหน่อยครับ
Date :
2013-12-05 10:13:06
By :
itdefent
Load balance : Server 05