[HIGHLIGHT="PHP"]
Código PHP:
Ver original<?php require('/Connections/hoysale.php'); ?>
<?php $updateSQL = ("UPDATE formulario_clasificados SET visitas=visitas+1 WHERE id_rubro=%s");?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
}
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;
}
}
$colname_detallesdelclasificado = "-1";
if (isset($_GET['ver'])) { $colname_detallesdelclasificado = $_GET['ver'];
}
$query_detallesdelclasificado = sprintf("SELECT * FROM formulario_clasificados WHERE id_rubro = %s", GetSQLValueString
($colname_detallesdelclasificado, "int")); $totalRows_detallesdelclasificado = mysql_num_rows($detallesdelclasificado); ?>
<?php
?>
la parte html la pongo en otro comentario porque no me deja agregar mas