上面的问题^^^^^没有正确答案pregmatch打破where子句
在这一问题的答案接受导致MYSQL页面打散查询,我仍然需要在PHP中的解决方案和在这个问题中提供的答案中的链接实际上是我需要的。
我想在SQL打造出来的where
条款的有用阵列
那么让我们来承担这些:
where a=b and b=c or d=g and (a=f or x=6)
where a=b and b='d and f' or d=g and (a=f or x=6)
where a=b and b="d and f (or just text)" or d=g and (a=f or x=6)
where "a"=b and
b ="Note that colum names might be quoted differently in different databases" or d=g and (a=f or x=6)
where "a"='b' and
b ="as well as values" or d=g and (a=f or x=6)
where "a"='b' and
b ="multiple levels" or d=g and (a=f or x=6 or (x=5 and v=7))
我想尝试和突破任何where子句(与关键=值...又名无子查询)到也许有用的阵列? 类似:
x= array(
array('a' => 'b' , 'b' => 'c'),
array('d' => 'g' , array(array('a' => 'f'),array('x' => '6')),
);
其中和是一个数组或新数组
或任何其他形式,只是为了能够重建到任何我想要整个查询。
preg_match在这里足够了吗?
有什么用此之外的家庭作业的? – BLaZuRE
@Ronan Dejhero每个人都有哪些个人问题? – ripa
SQL分析器在这里会更有意义。 –