Ante todo muchas gracias por el interes y perdon por no responder ayer pero no pude.El codigo completo es este:
Código :
<?php require_once('Connections/inexcar.php'); ?>
<?php require_once('includes/ultimos_registro.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;
}
}
$maxRows_busqueda = 20;
$pageNum_busqueda = 0;
if (isset($_GET['pageNum_busqueda'])) {
$pageNum_busqueda = $_GET['pageNum_busqueda'];
}
$startRow_busqueda = $pageNum_busqueda * $maxRows_busqueda;
$colname_busqueda = "-1";
if (isset($_GET['busqueda'])) {
$colname_busqueda = (get_magic_quotes_gpc()) ? $_GET['busqueda'] : addslashes($_GET['busqueda']);
}
$colname2_busqueda = "-1";
if (isset($_GET['busqueda'])) {
$colname2_busqueda = (get_magic_quotes_gpc()) ? $_GET['busqueda'] : addslashes($_GET['busqueda']);
}
$colname3_busqueda = "-1";
if (isset($_GET['busqueda'])) {
$colname3_busqueda = (get_magic_quotes_gpc()) ? $_GET['busqueda'] : addslashes($_GET['busqueda']);
}
mysql_select_db($database_inexcar, $inexcar);
$query_busqueda = sprintf("SELECT * FROM datos_coches, lista_marcas WHERE (datos_coches.marca LIKE CONCAT('%%', %s, '%%') OR datos_coches.modelo LIKE CONCAT('%%', %s, '%%') OR datos_coches.combustible LIKE CONCAT('%%', %s, '%%')) AND datos_coches.marca = lista_marcas.id_marca", GetSQLValueString($colname_busqueda, "text"),GetSQLValueString($colname2_busqueda, "text"),GetSQLValueString($colname3_busqueda, "text"));
$query_limit_busqueda = sprintf("%s LIMIT %d, %d", $query_busqueda, $startRow_busqueda, $maxRows_busqueda);
$busqueda = mysql_query($query_limit_busqueda, $inexcar) or die(mysql_error());
$row_busqueda = mysql_fetch_assoc($busqueda);
if (isset($_GET['totalRows_busqueda'])) {
$totalRows_busqueda = $_GET['totalRows_busqueda'];
} else {
$all_busqueda = mysql_query($query_busqueda);
$totalRows_busqueda = mysql_num_rows($all_busqueda);
}
$totalPages_busqueda = ceil($totalRows_busqueda/$maxRows_busqueda)-1;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin título</title>
<link href="estilo.css" rel="stylesheet" type="text/css" />
<script src="../Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>
<body>
<div id="total">
<div id="identidad">
<div id="logo"></div>
<div id="buscador">
<?php require_once('includes/buscar.php'); ?>
</div>
</div>
<div id="flash">
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','650','height','210','title','imagenes_movimiento','src','MAT/flash','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','MAT/flash' ); //end AC code
</script>
<noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="650" height="210" title="imagenes_movimiento">
<param name="movie" value="MAT/flash.swf" />
<param name="quality" value="high" />
<embed src="MAT/flash.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="650" height="210"></embed>
</object></noscript>
</div>
<div id="marca">
<?php require_once('includes/marca.php'); ?>
</div>
<div id="navegacion">
<ul>
<li><a href="#" class="actual">NOSOTROS</a></li>
<li><a href="importacion.php">IMPORTACIÓN</a></li>
<li><a href="nacional.php">NACIONAL</a></li>
<li><a href="contacto.php">CONTACTO</a></li>
</ul>
</div>
<div id="columnas">
<div id="c_izq">
<h2>ULTIMAS ENTRADAS </h2>
<p> </p>
<p>
</p>
<?php require_once('includes/ultimos_disenyo.php'); ?>
</div>
<div id="c_dcha">
<h1>NOSOTROS - Filosofía </h1>
<p>Se han encontrado <?= $totalRows_busqueda ?> vehículos:</p>
<p> </p>
<?php do { ?>
<p><a href="datos_coches.php?id_coche=$row_busqueda['id_coche']"><?php echo $row_busqueda['marc']; ?> <?php echo $row_busqueda['modelo']; ?></a></p>
<?php } while ($row_busqueda = mysql_fetch_assoc($busqueda)); ?></div>
</div>
<div id="borrar"></div>
<div id="pie">INEXCAR 2007 © </div>
</div>
</body>
</html>
<?php
mysql_free_result($busqueda);
?>