• Resolved imslee100

    (@imslee100)


    Hello. I modified the code like following, but alias dosn’t showing at all. But there is no error.

    Could you please fix the code or give me the example how to use “columnNameMap” with “add_db_table_editor” ?

    ———– code ———————-

    add_db_table_editor(array(“title”=>”[??]??? ????”,”table”=>”student_contests”,”sql”=>”SELECT id, contest_id, post_title, name, grade, class, title, school, address, sender, phone, p_delivery, p_invoice_num, pre_state FROM student_contests ORDER BY id DESC”,”columnNameMap=>array(‘contest_id’=>’????’, ‘post_title’=>’????’, ‘name’=>’??’, ‘grade’=>’??’, ‘class’=> ‘?’, ‘title’=>’???’, ‘school’=>’???’, ‘address’=>’????’, ‘sender’=>’???’, ‘phone’=>’????’, ‘p_delivery’=>’???????’, ‘p_invoice_num’=>’????’, ‘pre_state’=>’??’)”));

    https://www.ads-software.com/plugins/wp-db-table-editor/

Viewing 1 replies (of 1 total)
  • Plugin Author bobbysmith007

    (@bobbysmith007)

    "columnNameMap=>array('contest_id'=>'????', 'post_title'=>'????', 'name'=>'??', 'grade'=>'??', 'class'=> '?', 'title'=>'???', 'school'=>'???', 'address'=>'????', 'sender'=>'???', 'phone'=>'????', 'p_delivery'=>'???????', 'p_invoice_num'=>'????', 'pre_state'=>'??')"

    That seems like a parse error (the double quote is at the very end). You should quote the key and not the array as follows:

    "columnNameMap"=>array('contest_id'=>'????', 'post_title'=>'????', 'name'=>'??', 'grade'=>'??', 'class'=> '?', 'title'=>'???', 'school'=>'???', 'address'=>'????', 'sender'=>'???', 'phone'=>'????', 'p_delivery'=>'???????', 'p_invoice_num'=>'????', 'pre_state'=>'??')

Viewing 1 replies (of 1 total)
  • The topic ‘Related question about previous question.’ is closed to new replies.