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 . ')';
}
}
@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