160 * |
160 * |
161 * @since 1.0.0 |
161 * @since 1.0.0 |
162 * |
162 * |
163 * @global wpdb $wpdb WordPress database abstraction object. |
163 * @global wpdb $wpdb WordPress database abstraction object. |
164 * |
164 * |
165 * @param string $table_name Database table name. |
165 * @param string $table_name Database table name. |
166 * @param string $col_name Table column name. |
166 * @param string $col_name Table column name. |
167 * @param string $col_type Table column type. |
167 * @param string $col_type Table column type. |
168 * @param bool $is_null Optional. Check is null. |
168 * @param bool $is_null Optional. Check is null. |
169 * @param mixed $key Optional. Key info. |
169 * @param mixed $key Optional. Key info. |
170 * @param mixed $default Optional. Default value. |
170 * @param mixed $default_value Optional. Default value. |
171 * @param mixed $extra Optional. Extra value. |
171 * @param mixed $extra Optional. Extra value. |
172 * @return bool True, if matches. False, if not matching. |
172 * @return bool True, if matches. False, if not matching. |
173 */ |
173 */ |
174 function check_column( $table_name, $col_name, $col_type, $is_null = null, $key = null, $default = null, $extra = null ) { |
174 function check_column( $table_name, $col_name, $col_type, $is_null = null, $key = null, $default_value = null, $extra = null ) { |
175 global $wpdb; |
175 global $wpdb; |
176 |
176 |
177 $diffs = 0; |
177 $diffs = 0; |
178 $results = $wpdb->get_results( "DESC $table_name" ); |
178 $results = $wpdb->get_results( "DESC $table_name" ); |
179 |
179 |