Problemas en la version de PHP Version 5.5.38
hola buenas estoy teniendo problemas al hacer un GETSTRING en una consulta de mysql con php
osea que me aparece un error en el fichero de funciones
codigo
osea que me aparece un error en el fichero de funciones
codigo
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("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } }
1
Puntos
Puntos
1791
Visitas
Visitas
3
Resp
Resp
Por pablo hace 90 meses
Experto
Respuesta #1
creo que el error lo estas teniendo tu a la hora de ejecutar la función, en el mensaje te dice que necesita un segundo argumento es decir el tipo (type)
si ejecutas la función de esta manera:
si ejecutas la función de esta manera:
GetSQLValueString("cadena");tendrás el error, pero si lo haces pasando el tipo en teoría no:
GetSQLValueString("cadena","text");prueba y nos cuentas ;)
1
Puntos
Puntos
Por alber hace 90 meses
Administrador
Respuesta #2
es mas enseña en código de inc/loguin.php y lo miramos juntos salu2
0
Puntos
Puntos
Por alber hace 90 meses
Administrador
Respuesta #3
dale gracias albert
era la version de php que no era compatible o nose. el fin le intale la version que haz posteado hace un tiempo como descargar servidor xampp o web
gracias por tu aporte
era la version de php que no era compatible o nose. el fin le intale la version que haz posteado hace un tiempo como descargar servidor xampp o web
gracias por tu aporte
1
Puntos
Puntos
Por pablo hace 90 meses
Experto