自己動手做一個SQL解釋器
Jun 08, 2016 pm 05:33 PM這是從別的地方看到的,俺還不會寫這么無聊的東西
class DB_text {
var $conn;
var $classname = "db_text";
var $database;
function on_create() {
}
function connect($database_name) {
$this->database = $database_name;
if(! file_exists($database_name)) {
$this->conn = array();
$this->_close();
}
$fp = fopen($this->database,"r");
$this->conn = unserialize(fread($fp,filesize($this->database)));
fclose($fp);
}
function &query($query) {
if(eregi("select ",$query)) return $this->_select($query);
if(eregi("insert ",$query)) return $this->_insert($query);
if(eregi("delete ",$query)) return $this->_delete($query);
if(eregi("update ",$query)) return $this->_update($query);
return array();
}
function fetch_row(&$result) {
if(list($key,$value) = each($result))
return $value;
return false;
}
function num_rows($result) {
return count($result);
}
/**
* query的輔助函數(shù)
*/
function _select($query) {
if(eregi("(order by (. ))",$query,$regs)) {
$order = $regs[2];
$query = eregi_replace($regs[1],"",$query);
}
if(eregi("(group by (. ))",$query,$regs)) {
$group = $regs[2];
$query = eregi_replace($regs[1],"",$query);
}
eregi("select .* from ([0-9a-z_] ) *(where (. ))?",$query,$regs);
if($regs[3] != "") {
$keys = $this->_where($regs[3],"$this->conn[$regs[1]]");
while(list($key,$value) = each($keys)) {
$rs[] = $this->conn[$regs[1]][$value];
}
}else {
$rs = $this->conn[$regs[1]];
}
if($order) {
sscanf($order,"%s %s",$key,$type);
if(empty($type)) $type = "asc";
$this->_sort($rs,$key,$type);
}
return $rs;

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

??? ??











C ???? return? ???? ??? ????. 1. ?? ? ??? void? ??? ?? return ?? ???? ?? ??? ??? ??? ? ????. 2. ?? ? ??? void? ?? ??? ?? return ?? ?? ??? ???? ????. ??? ????? ?????. 3. ?? ??? ??? ?????. ?? ????? return ?? ???? ?? ??? ??? ??? ? ????. ??? ?? ???? ?? ??.

?? ??: publicclassReturnFinallyDemo{publicstaticvoidmain(String[]args){System.out.println(case1());}publicstaticintcase1(){intx;try{x=1;returnx;}finally{x=3;}}}# ?? ? ??? ??? ??? ??? ?? ? ????. return? finally ?? ?????. ????? ???? ?? ?? ????? ???????. ??? case1 ???? ????? ??? ???? ?? ??? ???? ? ???? ??? ???? ?????.

? ????? ??? ??? ?? PowerQuery?? ?? ?? ??? ??? ??? ?????. ??? ???? ???? ??? ? ?? ??? ??? ??? ?? ??? ????. ?? ?? ???? ?? ?? ?? ?? ??? ?? ??? ??? ?? ??? ? ?? ?? ??? ???? ???? ???? ???, ??, ?? ?? ?? ?? ??? ?????. Excel?? ?? ?? ?? ???? ??? ?????? Excel?? ?? ????? ???? ?? ??? ????. ? ???? ???? ??? ??? ??? ?? ???. ??? ? ?? ??? ?? ?? ??? ??? ???? ??? ? ???? ? ????. ?? ?? ????? ?? ????? ??? ?? ???? ??? ? ????. ?? ??

ReactQuery ?????? ????: ??? ???? ? ????? ???? ???? ?? ?? ??? ?????. ??? ?? ???? ReactQuery? ?? ???? ?? ?? ? ?? ???? ?? ???? ???? ???? ??????. ?? ????? ???? ?? ??? ????? ?? ??? ???? ??????? ???? ?? ??? ????. ??? ??? ?? ???? ???? ???? ReactQuery ?????? ????? ??? ? ????. ReactQuery ?????? ????? ??? ???? ?????.

php提交表單通過后,彈出的對話框怎樣在當前頁彈出php提交表單通過后,彈出的對話框怎樣在當前頁彈出而不是在空白頁彈出?想實現(xiàn)這樣的效果:而不是空白頁彈出:------解決方案--------------------如果你的驗證用PHP在后端,那么就用Ajax;僅供參考:HTML code

? ?? Vue ?? ??? ???? ? ??? ? ??? ?? ???? Vue2? ??? ???? ??? ???? ? ?? ??? ???? ?? ?? ???? ??? ??? ????!

JavaScript?? return? ????? ?? ?? ??? ?????. JavaScript?? return ?? ???? ???? ?? ???? ? ?????. ?? ??? ???? ? ??? ? ?? ?? ??? ??? ??? ??? ?? ??? ?? ????. return ??? ??? ?? ???? ??? ????. ? ?? return ?? ??? ??? ??? ?? ???? ? ??? ? ????. ??? ??? ????: functionadd(a,b){

Vue3.2 ?? ?? ??? Vue3.0? ???? ??? ???? ?? ?? ?? ?? ??(SFC)?? ??? API? ???? ??? ?? ?? ?????. ?? ? ??? 1. ?? ?? import? ??? ??? ??, ?? ? ???? ??? ??? ????. //??? ??? ???? import{getToday. }from'./utils'//?? constmsg='?????!'//?? func
