From 7d8cc88c7b73113e5a607f93070205c5c8a7a9be Mon Sep 17 00:00:00 2001 From: deepend-tildeclub <58404188+deepend-tildeclub@users.noreply.github.com> Date: Tue, 23 Jan 2024 20:03:25 -0700 Subject: [PATCH] Update btmysql.php 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. --- src/classes/btmysql.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/classes/btmysql.php b/src/classes/btmysql.php index 82f37287..1c48526e 100644 --- a/src/classes/btmysql.php +++ b/src/classes/btmysql.php @@ -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 "

"; @@ -116,6 +116,7 @@ public function bindParams($objMySQLiStmt, $arrValues) { return $returnVal; } + public function optimizeTables() { $tables = array(); @@ -132,4 +133,4 @@ public function optimizeTables() { } -} \ No newline at end of file +}