x
// SQL 分析
var z_sql_parser8 = function() {
;
};
z_sql_parser8.prototype.args = {
// 关键词
'keyword':{
// 方法
'WAY':['SELECT','UPDATE','DELETE','INSERT'],
// 块
'block':['FROM','SET','JOIN','WHERE','ORDER','HAVING','GROUP','LIMIT'],
// 块 相关
'relevant':['BY','INNER','OUTTER','LEFT','RIGHT'],
// 连接
'link':['AS','OR','AND','SET','VALUES','IN','NOT','ASC','DESC','UNION'],
// 函数
'fun':['IN','NOT IN','MAX','MIN','SUM','AVG','COUNT','CONCAT'],
}
};
z_sql_parser8.prototype.take = [];
// 提取 字符串
z_sql_parser8.prototype.str_extract = function(sql) {
var self = this;
this.take = [];
// 提取 转义的单引号
sql = sql.replace(/[\\]+'/gi,function(a){
self.take.push(a);
$x = 1;
$y = 50;
$ternary = ($x == 1) ? "Yes" : "No";
var_dump($ternary);
var_dump($x < $y);
var_dump($x == 2);
if ($x < $y) {
echo("x < y");
} else if ($x == 2) {
echo("x==2");
} else {echo("else...");
}switch ($x){case 5:
echo("Five!");
case 1:
echo("One!");
default:
echo("Default!");
}