|
|
|
สอบถามการ นำ ค่า ที่ไม่ได้เลือกออกมาแสดง ตัวอย่างในทู้น่ะครับ |
|
|
|
|
|
|
|
Code (PHP)
$sql = "SELECT auto_id, fname, lname, email,id, password,confirmpassword, date, time FROM itpolicy
WHERE";
$con = "";
echo "<tr>";
echo $sql;
$sql=$sql." date BETWEEN '$date_s_select' " ;
$sql=$sql."AND '$date_e_select' ";
while($row = db_fetch_array($query))
{
echo "<tr><td>";
echo $row['auto_id'];
echo "</td><td>";
echo $row['fname'];
echo "</td><td>";
echo $row['lname'];
echo "</td><td>";
echo $row['email'];
echo "</td><td>";
echo $row['id'];
echo "</td><td>";
echo $row['password'];
echo "</td><td>";
echo $row['confirmpassword'];
echo "</td><td>";
echo $row['date'];
echo "</td><td>";
echo $row['time'];
}
echo "</table>";
?>
ผมต้องการนำค่าที่ไม่ได้อยู่ในช่วง $date_s_select' กับ $date_e_select' ออกมาด้วยครับ
Tag : PHP, MySQL, CakePHP
|
|
|
|
|
|
Date :
2010-08-03 11:50:43 |
By :
nut_ch31 |
View :
763 |
Reply :
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (PHP)
$sql=$sql." date < '$date_s_select' " ;
$sql=$sql."AND date >'$date_e_select' ";
|
|
|
|
|
Date :
2010-08-03 15:39:42 |
By :
iieszz |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$sql=$sql." date NOT BETWEEN '$date_s_select' " ;
ใช้ได้แระครับ
|
|
|
|
|
Date :
2010-08-03 17:05:15 |
By :
nut_ch31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 02
|