Bueno problema de user/pass solucionado, ahora aparece otro xD (es el problema infinito!!!!):
Warning: mysql_error() expects parameter 1 to be resource, string given in C:\Program Files\EasyPHP-5.3.8.0\www\modelo.php on line 57
Aqui el codigo:
Código PHP:
Ver original<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<body>
<?php
//Conectamos la bbdd
//seleccionamos los registros que queremos
$modelo = $_POST["modelo"];
//$queEmp = 'SELECT A.Description, A.Partnumber, B.Modelo FROM baterias AS A INNER JOIN baterias AS B ON A.Partnumber = B.Partnumber WHERE A.Modelo LIKE '.$modelo.' AND A.Partnumber LIKE "BT.%" AND A.Description LIKE "BATTERY%" ORDER BY A.Partnumber';
$queEmp = 'SELECT Description, Partnumber FROM baterias WHERE Modelo = "'.$modelo.'" AND Description LIKE "BATTERY%" ORDER BY Partnumber';
?>
<table border = "1">
<tr>
<td bgcolor="#c0c0c0">Descripcion</td>
<td bgcolor="#c0c0c0">Part Number</td>
<td bgcolor="#c0c0c0">Modelos Compatibles</td>
</tr>
<?php
if ($totEmp> 0) {
$contador = 0;
//$temporal= "<tr><td>".$primero."</td><td>".$segundo."</td><td>".$rowEmp['B.Modelo']."</td>";
if ($contador = 0){
echo "<tr><td>".$rowEmp['Description']."</td>";
echo "<td>".$rowEmp['Partnumber']."</td>";
$queEmp2 = 'SELECT Modelo FROM baterias WHERE Partnumber ='.$rowEmp['Partnumber'].'';
$i = 0;
if ($i = 0){
echo "<td>".$rowEmp2['Modelo']."</td></tr>";
$i = 1;
}else{
echo "<tr><td></td><td></td>";
echo "<td>".$rowEmp2['Modelo']."</td><tr>";
}
}
$contador = 1;
}
else{
echo "<tr><td>".$rowEmp['Description']."</td>";
echo "<td>".$rowEmp['Partnumber']."</td>";
$queEmp2 = 'SELECT Modelo FROM baterias WHERE Partnumber ='.$rowEmp['Partnumber'].'';
$i = 0;
if ($i = 0){
echo "<td>".$rowEmp2['Modelo']."</td></tr>";
$i = 1;
}else{
echo "<tr><td></td><td></td>";
echo "<td>".$rowEmp2['Modelo']."</td><tr>";
}
}
}
}
}
?>
</table>
</body>
</html>