Tema: como puedo?
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/05/2009, 19:31
Avatar de jamesjara
jamesjara
 
Fecha de Ingreso: mayo-2008
Ubicación: san jose
Mensajes: 449
Antigüedad: 16 años, 9 meses
Puntos: 7
como puedo?

Hola amigos como podria hacer esto con que me ayuden con esto, ya podre convertir todo mi codigo
..

por ejemplo tengo este codigo
Código 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("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;
}

yo lo uso aproximadamente casi 50 veces en un sistema, me gustaria usarlo solo en una pàgina php y llamarlo, ejemplo usar un <?php include('funciones.php'); ?>

tambien si me ayudan con estas dos
Código PHP:
$editFormAction $_SERVER['PHP_SELF'];
if (isset(
$_SERVER['QUERY_STRING'])) {
  
$editFormAction .= "?" htmlentities($_SERVER['QUERY_STRING']);
}
$colname_po "-1";
if (isset(
$_POST['id'])) {
  
$colname_po $_POST['id'];

__________________
X7CLOUD El webservice latino!
Compatible
con mysql,sql,sqlitte.
Compatible con extjs , sencha , smargwt, Gwt , Jquery , Charts, Streaming.