Ver Mensaje Individual
  #1 (permalink)  
Antiguo 18/05/2009, 12:55
esaenz22
(Desactivado)
 
Fecha de Ingreso: abril-2008
Mensajes: 787
Antigüedad: 16 años
Puntos: 7
diferencia de generar codigo php medindte dremweaver y desarrollar propio codigo

buenas. tengo una duda. en el adobe dreamweaver cs3 o cs4 hay herramientas de opciones para generar codigo php para insertar registros, actualizar registros , editar registros, generar formularios de registros. el codigo lo genera bien, pero de una manera distinta, es decir, de esta forma:

Código PHP:
require_once('Connections/cn.php');

if (!
function_exists("GetSQLValueString")) {
function 
GetSQLValueString($theValue$theType$theDefinedValue ""$theNotDefinedValue ""
{
  
$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;
}
}

mysql_select_db($database_cn$cn);
$query_rsproductos "SELECT * FROM miusb_productos";
$rsproductos mysql_query($query_rsproductos$cn) or die(mysql_error());
$row_rsproductos mysql_fetch_assoc($rsproductos);
$totalRows_rsproductos mysql_num_rows($rsproductos); 
para hacer un proyecto web, necesariamente debemos recurrir al dreamweaver para generar codigo pp para mostrar datos, agregar datos, editar datos, borrar datos o programar con nuestro propio codigo php. bueno ya que al final lo que se desea ver es el resultado final.

esa es mi duda.