Skip to content

Kindly replace array values with type numbers #5260

@Akshay-Hegde

Description

@Akshay-Hegde

array('tinyint', 'smallint', 'mediumint', 'int', 'bigint'), //, 'timestamp'),

http://php.net/manual/en/mysqli-result.fetch-field.php

fetch_field() returns type numbers so, kindly replace it with type number instead of name.

array( 1, 2, 9, 3, 8 )

$is_int[$i] = in_array($field->type, array( 1, 2, 9, 3, 8), TRUE);

numerics

BIT: 16
TINYINT: 1
BOOL: 1
SMALLINT: 2
MEDIUMINT: 9
INTEGER: 3
BIGINT: 8
SERIAL: 8
FLOAT: 4
DOUBLE: 5
DECIMAL: 246
NUMERIC: 246
FIXED: 246

Fixed here :

https://stackoverflow.com/questions/46178066/codigniter-backup-library-creating-wrong-insert-query/46182021#46182021

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions