Skip to content

Instantly share code, notes, and snippets.

@bamz3r
Forked from vdeville/fix_phpmyadmin.php
Last active May 14, 2017 18:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bamz3r/167cf4618c2e6be5d0a76eeade8c5b41 to your computer and use it in GitHub Desktop.
Save bamz3r/167cf4618c2e6be5d0a76eeade8c5b41 to your computer and use it in GitHub Desktop.
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
Copy link
Author

bamz3r commented Oct 28, 2016

This fixed creation and edit of enum type in my case

@batthiqbal27
Copy link

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

@mooyiwa
Copy link

mooyiwa commented Feb 7, 2017

No notes sir! When do you run this?

@zuera
Copy link

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