Add the missing function to pdo.php.

This commit is contained in:
markjcrane 2016-04-29 11:21:26 -06:00
parent d43a8f20a5
commit eec04d521d
1 changed files with 22 additions and 0 deletions

View File

@ -153,6 +153,28 @@ if ($db_type == "sqlite") {
return substr($string, (strlen($string)-$num), strlen($string));
}
}
if (!function_exists('php_sqlite_data_type')) {
function php_sqlite_data_type($string, $field) {
//get the string between the start and end characters
$start = '(';
$end = ')';
$ini = stripos($string,$start);
if ($ini == 0) return "";
$ini += strlen($start);
$len = stripos($string,$end,$ini) - $ini;
$string = substr($string,$ini,$len);
$str_data_type = '';
$string_array = explode(',', $string);
foreach($string_array as $lnvalue) {
$fieldlistarray = explode (" ", $value);
unset($fieldarray, $string, $field);
}
return $str_data_type;
}
}
//database connection
try {