Hi Codeigniter 专家。
我用几条电话汇编了请求书。
在完成这项工作时,我利用请求检索一些当然数据。
Each call, calls another function which gets and returns some translations which is supposed to be used in the QUERY
但是,似乎同样,译本的WHERE条件被Im在主要请求中汇编的WHERE条件所混为一谈。
private function add_to_asq($field_name, $values)
{
.
.
.
.
$result = array();
foreach( $values[$last_level] as $val )
{
foreach( $val as $v )
{
$result[] = $this->db->escape( $this->asq_value_translate( $last_level, $v, $field_name ) );
}
}
$this->db->where_in( sprintf( %1$s , $field_name ) , implode( , , $result ) );
}
private function asq_value_translate( $level, $value_md5 , $field_name )
{
$this->db->select( sprintf( level_%1$d, level_%1$d_value , $level ) )
->distinct()
->from( search_options_tree_view )
->where( sprintf( md5( level_%1$d_value ) = , $level ), $value_md5 )
->where( field_name , $field_name );
$q = $this->db->get();
$value_name = sprintf( level_%1$d , $level );
$row = $q->row(0);
$q->free_result();
return $row->$value_name;
}
and the DB complains about it
序号:1054
条款中未指明的列类
SELECT DISTINCT `level_1`, `level_1_value` FROM (`search_options_tree_view`) WHERE
`type` IN ( Forhandler )
AND md5( level_1_value ) = 138be735c55896dbdbea9b6c5d503b6f AND `field_name` = fuel
档案名称:C:wampwwwsystemdatabaseDB_driver.php
Line Number: 330
As you see the type
IN ( Forhandler ) has not anything to with the asq_value_translation.
你们是否有建议?
我对克隆技术的思考,但我当时认为,我先问,然后开枪。
感谢很多时间,时间很短。