Ver Mensaje Individual
  #1 (permalink)  
Antiguo 30/03/2009, 16:16
perosiol
 
Fecha de Ingreso: noviembre-2008
Mensajes: 9
Antigüedad: 15 años, 5 meses
Puntos: 0
Problema con PHP en dreamweaver

Buenas noches, necesitaba si algun entendido me puede ayudar, estoy trabajando en php con base mysql en dreamweaver, genero una consulta a la base y cuando la testeo con me arroja los valores que esperaba.
El inconveniente es que cuando intento ver la pagina php en el explorador me arroja un mensaje de error en la linea 32 de mi codigo

Mi codigo es el siguiente:

<?php require_once('Connections/conection.php'); ?>
<?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_conection, $conection);
$query_cuentaclientes = "SELECT IF(f.Comprobante=t1.minimo and OrdenCobro=0,clientes.RazonSocial,"") as cliente,IF(f.Comprobante=t1.minimo and OrdenCobro=0,f.CUIT,"") as CUIT2,f.CUIT, f.Comprobante, f.Total, IF(f.Comprobante=t1.minimo and OrdenCobro=0,t1.saldocliente,"") as saldo FROM facturaclientes f JOIN (SELECT CUIT, Comprobante,SUM(Total) as saldocliente, MIN(Comprobante) as minimo FROM facturaclientes GROUP BY CUIT)t1 JOIN clientes on f.CUIT=t1.CUIT and f.CUIT=clientes.CUIT ORDER BY f.CUIT, f.Comprobante";
$cuentaclientes = mysql_query($query_cuentaclientes, $conection) or die(mysql_error());
$row_cuentaclientes = mysql_fetch_assoc($cuentaclientes);
$totalRows_cuentaclientes = mysql_num_rows($cuentaclientes);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<table border="0">
<tr>
<td>cliente</td>
<td>CUIT2</td>
<td>CUIT</td>
<td>Comprobante</td>
<td>Total</td>
<td>saldo</td>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_cuentaclientes['cliente']; ?></td>
<td><?php echo $row_cuentaclientes['CUIT2']; ?></td>
<td><?php echo $row_cuentaclientes['CUIT']; ?></td>
<td><?php echo $row_cuentaclientes['Comprobante']; ?></td>
<td><?php echo $row_cuentaclientes['Total']; ?></td>
<td><?php echo $row_cuentaclientes['saldo']; ?></td>
</tr>
<?php } while ($row_cuentaclientes = mysql_fetch_assoc($cuentaclientes)); ?>
</table>
</body>
</html>
<?php
mysql_free_result($cuentaclientes);
?>