Skip to content

Commit

Permalink
Update btmysql.php
Browse files Browse the repository at this point in the history
fixes some variable errors. But also fixes some issues the page was having saving information in some text boxes.   For example if I remember correctly you'd go set a category name and instead of the words you put it would put a 0.
  • Loading branch information
deepend-tildeclub authored Jan 24, 2024
1 parent 54733cf commit 7d8cc88
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/classes/btmysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ public function bindParams($objMySQLiStmt, $arrValues) {
$returnVal = false;
$strParamTypes = $this->getParamTypes($arrValues);

$tmpParams = array_merge(array($strParamTypes), $arrValues);
$arrParams = array();
foreach($tmpParams as $key=>$value) {
$arrParams[$key] = &$tmpParams[$key];
}


if(!call_user_func_array(array($objMySQLiStmt, "bind_param"), $arrParams)) {
$params = array($strParamTypes);
foreach ($arrValues as $key => $value) {
$params[] = &$arrValues[$key];
}


if(!call_user_func_array(array($objMySQLiStmt, "bind_param"), $params)) {
$returnVal = false;
echo $objMySQLiStmt->error;
echo "<br><br>";
Expand All @@ -116,6 +116,7 @@ public function bindParams($objMySQLiStmt, $arrValues) {
return $returnVal;

}


public function optimizeTables() {
$tables = array();
Expand All @@ -132,4 +133,4 @@ public function optimizeTables() {

}

}
}

0 comments on commit 7d8cc88

Please sign in to comment.