functions.inc.php:

- delete unused function db_boolean_to_int()


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1377 a1433add-5e2c-0410-b055-b7f2511e0802
pull/2/head
Christian Boltz 13 years ago
parent f535a0f66f
commit a9f252baea

@ -1497,31 +1497,6 @@ function db_get_boolean($bool) {
} }
} }
/**
* Converts a boolean value from the database internal format to integer (0 or 1)
* Currently only PostgreSQL and MySQL are supported.
* @param string $bool (REQUIRED)
* @return int
*/
function db_boolean_to_int($bool) {
global $CONF;
if($CONF['database_type']=='pgsql') {
// return either true or false (unquoted strings)
if($bool == 't') {
return 1;
}
return 0;
} elseif($CONF['database_type'] == 'mysql' || $CONF['database_type'] == 'mysqli') {
if($bool) {
return 1;
}
return 0;
} else {
die('Unknown value in $CONF[database_type]');
}
}
// //
// db_query // db_query
// Action: Sends a query to the database and returns query result and number of rows // Action: Sends a query to the database and returns query result and number of rows

Loading…
Cancel
Save