My little brother recently ran into a bottle of décolleté, trying to integrate the if of the two ranges, but couldn't find a way
1.---------------------------------------------------------------------------------------------
header("Content-Type: text/html; charset=utf-8");include("connsql.php"); //含入連結資料庫檔案$seldb = @mysql_select_db("orderdrink"); //連結資料庫if (!$seldb) die("資料庫選擇失敗!");$sql_query = "SELECT `orderid`,`phone`,`name` FROM `orders` WHERE `finish`=0 ORDER BY `orderid` DESC";$result = mysql_query($sql_query);$numrow = mysql_num_rows($result);$row_result = array();$i = 0;while($row_result[$i] = mysql_fetch_array($result, MYSQL_ASSOC)){ $i++;}
?>
2.--------------------------------------------------------------------------------------------
header("Content-Type: text/html; charset=utf-8");include("connsql.php"); //含入連結資料庫檔案$seldb = @mysql_select_db("orderdrink"); //連結資料庫if (!$seldb) die("資料庫選擇失敗!");if (isset($_GET["update"])) { $order = $_GET["update"]; $sql_query = "UPDATE `orders` SET `finish`=1 WHERE `orderid`='" . $order . "'"; $result = mysql_query($sql_query); header("Location: index.php");}$row_detail = array();$order = $_GET["order"];$sql_query = "SELECT * FROM `orders` WHERE `orderid`='" . $order . "'";$result = mysql_query($sql_query);$numorder = 0;$numorder = mysql_num_rows($result);if($numorder>0) { $row_order = mysql_fetch_array($result, MYSQL_ASSOC); $sql_query = "SELECT * FROM `productdetail` WHERE `orderid`='" . $order . "'"; $result = mysql_query($sql_query); $numdetail = mysql_num_rows($result); $i = 0; while($row_detail[$i] = mysql_fetch_array($result, MYSQL_ASSOC)) { $i++; }}
?>
Want to ask the net friend how to do?
Reply content:
My little brother recently ran into a bottle of décolleté, trying to integrate the if of the two ranges, but couldn't find a way
1.---------------------------------------------------------------------------------------------
header("Content-Type: text/html; charset=utf-8");include("connsql.php"); //含入連結資料庫檔案$seldb = @mysql_select_db("orderdrink"); //連結資料庫if (!$seldb) die("資料庫選擇失敗!");$sql_query = "SELECT `orderid`,`phone`,`name` FROM `orders` WHERE `finish`=0 ORDER BY `orderid` DESC";$result = mysql_query($sql_query);$numrow = mysql_num_rows($result);$row_result = array();$i = 0;while($row_result[$i] = mysql_fetch_array($result, MYSQL_ASSOC)){ $i++;}
?>
2.--------------------------------------------------------------------------------------------
header("Content-Type: text/html; charset=utf-8");include("connsql.php"); //含入連結資料庫檔案$seldb = @mysql_select_db("orderdrink"); //連結資料庫if (!$seldb) die("資料庫選擇失敗!");if (isset($_GET["update"])) { $order = $_GET["update"]; $sql_query = "UPDATE `orders` SET `finish`=1 WHERE `orderid`='" . $order . "'"; $result = mysql_query($sql_query); header("Location: index.php");}$row_detail = array();$order = $_GET["order"];$sql_query = "SELECT * FROM `orders` WHERE `orderid`='" . $order . "'";$result = mysql_query($sql_query);$numorder = 0;$numorder = mysql_num_rows($result);if($numorder>0) { $row_order = mysql_fetch_array($result, MYSQL_ASSOC); $sql_query = "SELECT * FROM `productdetail` WHERE `orderid`='" . $order . "'"; $result = mysql_query($sql_query); $numdetail = mysql_num_rows($result); $i = 0; while($row_detail[$i] = mysql_fetch_array($result, MYSQL_ASSOC)) { $i++; }}
?>
Want to ask the net friend how to do?
Chained notation, because object-oriented features, you can return this
Http://segmentfault.com/a/1190000003069921?utm_source=APP&utm_medium=iOS&utm_campaign=socialShare