Ошибка... ожидает ровно 2 параметра, 1 дан
Я получаю ошибку:
"mysqli_real_escape_string() expects exactly 2 parameters, 1 given" on line 10.
Какой другой параметр, кроме $theValue, я должен передавать?
Вот код:
<?php require_once('../Connections/connTraffic.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysqli_real_escape_string") ? mysqli_real_escape_string($theValue) : mysqli_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;