Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
if ($length != '' && ! preg_match($pattern, $type)) {
$lengthFix = str_replace(",", ".", $length);
if($lengthFix != $length){
$modified = true;
}
if(is_numeric($lengthFix)){
if($modified){
$length = str_replace(".", ",", $lengthFix);
}
$query .= '(' . intval($length) . ')';
} else {
$query .= '(' . $length . ')';
}
}
@bamz3r

This comment has been minimized.

Show comment
Hide comment
@bamz3r

bamz3r Oct 28, 2016

This fixed creation and edit of enum type in my case

Owner

bamz3r commented Oct 28, 2016

This fixed creation and edit of enum type in my case

@batthiqbal27

This comment has been minimized.

Show comment
Hide comment
@batthiqbal27

batthiqbal27 Nov 2, 2016

Thanks bamz3r..
I was facing this issue from last one month but this works for me. Thank you very much!!

Thanks bamz3r..
I was facing this issue from last one month but this works for me. Thank you very much!!

@mooyiwa

This comment has been minimized.

Show comment
Hide comment
@mooyiwa

mooyiwa Feb 7, 2017

No notes sir! When do you run this?

mooyiwa commented Feb 7, 2017

No notes sir! When do you run this?

@zuera

This comment has been minimized.

Show comment
Hide comment
@zuera

zuera May 14, 2017

Thank you very much! This worked for me.

zuera commented May 14, 2017

Thank you very much! This worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment