Skip to content

Instantly share code, notes, and snippets.

@mcfarlan
Created March 5, 2019 15:18
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 mcfarlan/3c2a0ff3109c661f38f07330fb304c24 to your computer and use it in GitHub Desktop.
Save mcfarlan/3c2a0ff3109c661f38f07330fb304c24 to your computer and use it in GitHub Desktop.
if ( !$this->startsWithZeros( $value ) ) {
if ( is_numeric( $value ) && ( floor( $value ) == $value ) && $value >= 0 && $value <= 4294967295 ) {
return MySQL::C_DATATYPE_UINT32;
}
if ( is_numeric( $value ) ) {
return MySQL::C_DATATYPE_DOUBLE;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment