remove some unused functions and migrated some more functions to PDO database class, refs #1287

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2013-11-14 08:27:57 +01:00
parent 868b472b98
commit 12800b730d
23 changed files with 326 additions and 500 deletions

View File

@@ -17,19 +17,16 @@
*
*/
function getCustomerDetail($customerid, $varname)
{
global $db, $theme;
function getCustomerDetail($customerid, $varname) {
$query = 'SELECT `' . $db->escape($varname) . '` FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `customerid` = \'' . (int)$customerid . '\'';
$customer = $db->query_first($query);
$customer_stmt = Database::prepare("
SELECT `' . $varname . '` FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `customerid` = :customerid
");
$customer = Database::pexecute_first($customer_stmt, array('customerid' => $customerid));
if(isset($customer[$varname]))
{
if (isset($customer[$varname])) {
return $customer[$varname];
}
else
{
} else {
return false;
}
}