Ver Mensaje Individual
  #2 (permalink)  
Antiguo 18/01/2010, 12:59
proxy_lainux
 
Fecha de Ingreso: junio-2008
Mensajes: 30
Antigüedad: 15 años, 10 meses
Puntos: 0
Respuesta: porque razon no puedo extraer la informacion de la base de datos con mi pa

miren, les dejo el codigo, a ver si me pueden decir que podria estar mal o ke deberia cambiar para que funciona en mysql 5.1.26 porfavor, aunike podria ser en la parte de lect

Código:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>
			Hello Moto - Moto
		</title>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
		<link rel="stylesheet" type="text/css" href="CSS/Menu-Tab.css" />
	</head>
	<body bgcolor="#000000" topmargin="0">
	<SCRIPT LANGUAGE="JavaScript">
	<!--
		function PonerPrecio(Moto) {
			<?
			include("PHP/DB.php");
			if($rst3 = mysql_query("SELECT nId, xNombre, nPrecio, bAgotado FROM gMotoModelo WHERE nTipo = " . $Tipo . " AND bActivo = 1 ORDER BY nId", $db_conexion)) {
				while($rst3_reg = mysql_fetch_array($rst3)) {
					//if($rst4 = mysql_query("SELECT xPlazo1 FROM gBancoPlazo WHERE nBanco = 1 AND nModelo = '" . $rst3_reg["nId"] . "'", $db_conexion)) {
					//	if($rst4_reg = mysql_fetch_array($rst4)) {
							?>
							if(Moto==<? echo($rst3_reg["nId"]); ?>) {
								VP_Precio.innerText = "$<? echo($rst3_reg["nPrecio"]); ?>";
								VP.src = "imagen/VP_<? echo($rst3_reg["xNombre"]); ?>.gif";
								if( <? echo($rst3_reg["bAgotado"]); ?> == 1 ) {
									VP_Agotado.innerText = "Agotada";
								} else {
									VP_Agotado.innerText = "";
								}
							};
							<?
					//	}
					//} else {
					//	echo "Error en consulta 1<br>";
					//}
				}
			} else {
				echo "Error en consulta 2<br>";
			}
			?>
		}
	-->
	</SCRIPT>
		<table width="181" height="500" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" align="right">
			<tr>
				<td width="181" bgcolor="000000" valign="top">
					<?
					//include("PHP/DB.php");
					if($rst = mysql_query("SELECT nId, xTipo FROM gMotoModeloTipo ORDER BY nId", $db_conexion)) {
						?>
						<div id="menu-lat-enc"> 
							<ul>
								<?
								while($rst_reg = mysql_fetch_array($rst)) {
									?>
									<li> <a href="moto_menu.php?Tipo=<? echo($rst_reg["nId"]); ?>" target="Moto-Menu"> <? echo($rst_reg["xTipo"]); ?> </a> </li>
									<?
									if( $rst_reg["nId"] == $Tipo ) {
										if($rst2 = mysql_query("SELECT nId, xNombre FROM gMotoModelo WHERE nTipo = " . $Tipo . " AND bActivo = 1 ORDER BY nId", $db_conexion)) {
											?>
											</ul></div>
											<div id="menu-lat"> 
												<ul>
													<?
													while($rst2_reg = mysql_fetch_array($rst2)) {
														?>
														<li> <a href="moto_desglose.php?Id=<? echo($rst2_reg["nId"]); ?>&Objeto=1" target="Moto-Desglose" onMouseOver="PonerPrecio(<? echo($rst2_reg["nId"]); ?>);"> <? echo($rst2_reg["xNombre"]); ?> </a> </li>
														<?
													}
													?>
												</ul>
											</div>
											<div id="menu-lat-enc"><ul>
											<?	
										} else {
											echo "Error en consulta<br>";
										}
									}
								}
								?>
							</ul>
						</div>
						<?	
					} else {
						echo "Error en consulta<br>";
					}
					?>
					<div align="center">
						<img src="imagen/VP_Logo.gif" name="VP" width="120" height="90" border="0" id="VP">
						<font color="#FFFFFF">
							<br><span id=VP_Precio></span>
							<br><span id=VP_Agotado></span>
						</font>
					</div>
				</td>
			</tr>
		</table>
	</body>
</html>