function getmw_accountsData($inputArray, $outputArray) { $output = ''; $input = ''; /* Setting up Output Array */ if ($outputArray != '*') { for ($outputInd = 0; $outputInd < count($outputArray); $outputInd++) { $output .= $outputArray[$outputInd] . ","; } $output = chop($output, ","); } else { $output = $outputArray; } /* Setting up Input Array */ if ($inputArray != '1') { while (list($key, $val) = each($inputArray)) { $input .= $key . "='" . $val . "' AND "; } $input = chop($input, "AND "); } else { $input = $inputArray; } $selectQuery = "SELECT " . $output . " FROM mw_accounts WHERE " . $input; $this->logger->info("[func - getmw_accountsData()] Query : " . $selectQuery); $dbObject = new Database(); $conn = $dbObject->dbinteraction(constant("MW_SNAME"), constant("MW_DBNAME"), constant("MW_USER"), constant("MW_PWD")); $jsonData = $dbObject->getJSONData($conn, $selectQuery); $conn->close(); return $jsonData; }
function getuser_commentsData($inputArray, $outputArray) { $output = ''; $input = ''; /* Setting up Output Array */ if ($outputArray != '*') { for ($outputInd = 0; $outputInd < count($outputArray); $outputInd++) { $output .= $outputArray[$outputInd] . ","; } $output = chop($output, ","); } else { $output = $outputArray; } /* Setting up Input Array */ if ($inputArray != '1') { while (list($key, $val) = each($inputArray)) { $input .= $key . "='" . $val . "',"; } $input = chop($input, ","); } else { $input = $inputArray; } $selectQuery = "SELECT " . $outputArray . " FROM user_comments WHERE " . $inputArray; $this->logger->info("[func - getuser_commentsData()] Query : " . $selectQuery); $dbObject = new Database(); $jsonData = $dbObject->getJSONData($selectQuery); return $jsonData; }
function getbiz_subcategoriesbiz_categoriesData($inputArray, $outputArray) { $output = ''; $input = ''; /* Setting up Output Array */ if ($outputArray != '*') { for ($outputInd = 0; $outputInd < count($outputArray); $outputInd++) { $output .= $outputArray[$outputInd] . ","; } $output = chop($output, ","); } else { $output = $outputArray; } /* Setting up Input Array */ if ($inputArray != '1') { while (list($key, $val) = each($inputArray)) { $input .= $key . "='" . $val . "',"; } $input = chop($input, ","); } else { $input = $inputArray; } $selectQuery = "SELECT " . $outputArray . " FROM biz_subcategories,biz_categories WHERE " . $inputArray; $this->logger->info("[func - getbiz_subcategoriesbiz_categoriesData()] Query : " . $selectQuery); $dbObject = new Database(); $conn = $dbObject->dbinteraction($biz_sname, $biz_dbname, $biz_user, $biz_pwd); $jsonData = $dbObject->getJSONData($conn, $selectQuery); $conn->close(); return $jsonData; }