google-code-export / wordpress-custom-content-type-manager

Automatically exported from code.google.com/p/wordpress-custom-content-type-manager
2 stars 1 forks source link

Execute as a MySQL query? Option not working properly for Multiple Select Fields #463

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The sql queries for populating option in case of Multiple Select field type is 
not working. To fix this issue We added following line of code in
custom-content-type-manager\fields\multiselect.php file on line no 132

 if($this->is_sql)
        {
               global $wpdb;
                global $table_prefix;
                $wpdb->hide_errors();
                $query = CCTM::parse($this->alternate_input, array('table_prefix'=>$table_prefix));
                //return $query;
                $results = $wpdb->get_results($query, ARRAY_N);
               // echo '<pre>';print_r($results);echo '</pre>';
                foreach ($results as $k=>$v) {
                    $val[$k]=$v[0];
                    $opt[$k]=$v[1];

                }
                 $this->options=$opt;
                 $this->values=$val;
                 $this->use_key_values=true;

        }
I think this code is missing in that file. Hope this will be helpful for you.

Thanks a lot for this great plugin..

Original issue reported on code.google.com by elex...@gmail.com on 22 Feb 2013 at 10:25

GoogleCodeExporter commented 9 years ago

Original comment by ever...@fireproofsocks.com on 22 Feb 2013 at 4:02

GoogleCodeExporter commented 9 years ago
Issue 465 has been merged into this issue.

Original comment by ever...@fireproofsocks.com on 6 Mar 2013 at 8:20

GoogleCodeExporter commented 9 years ago
Ah, you're right.  I didn't copy that from the dropdown field.  The req'd code 
was copied from dropdown.php : that handles the "bulk" option too. 

Committed revision 684993.

Original comment by ever...@fireproofsocks.com on 21 Mar 2013 at 12:07

GoogleCodeExporter commented 9 years ago
Issue 465 has been merged into this issue.

Original comment by ever...@fireproofsocks.com on 25 Jun 2013 at 6:05