[wp-trac] [WordPress Trac] #43578: Unexpected MYSQL data format

WordPress Trac noreply at wordpress.org
Mon Feb 3 18:01:45 UTC 2020


#43578: Unexpected MYSQL data format
-------------------------------------------------+-------------------------
 Reporter:  loranrendel                          |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Database                             |     Version:  4.9.4
 Severity:  normal                               |  Resolution:
 Keywords:  2nd-opinion has-patch has-unit-      |     Focuses:
  tests dev-feedback                             |
-------------------------------------------------+-------------------------

Comment (by loranrendel):

 Maybe something like this for non-wordpress tables:
 {{{#!php
 <?php
 $fields = ($wpdb->get_results("DESC
 {$wpdb->prefix}regsystem_applications2"));
 }}}

 We will have types for any field
 {{{
     [0] => Array
         (
             [Field] => id
             [Type] => int(11)
             [Null] => NO
             [Key] => PRI
             [Default] =>
             [Extra] => auto_increment
         )

     [1] => Array
         (
             [Field] => form_id
             [Type] => int(11)
             [Null] => YES
             [Key] =>
             [Default] =>
             [Extra] =>
         )

     [2] => Array
         (
             [Field] => record_id
             [Type] => int(11)
             [Null] => YES
             [Key] =>
             [Default] =>
             [Extra] =>
         )

     [3] => Array
         (
             [Field] => user_id
             [Type] => varchar(64)
             [Null] => YES
             [Key] =>
             [Default] =>
             [Extra] =>
         )

 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/43578#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list