是否有任何类型的 php 库可以对数组执行 SQL 查询?
像这样的东西:
$array = array(
array(
"field_a" => "first_a"
"field_b" => "something"
),
array(
"field_a" => "second_a"
"field_b" => "else"
),
array(
"field_a" => "third_a"
"field_b" => "something"
)
);
$rows = arrayQuery($array, "SELECT field_a WHERE field_b = 'something'");
/*
$rows = array(
array(
"field_a" => "first_a"
),
array(
"field_a" => "third_a"
)
);
*/
发现类似的东西:http ://blog.phpdeveloper.org/?p=61 ,但这不是查询。