hi, i have this code, i'm trying to display some information of some articles.
first of all, i have no information on the database yet, just the database.
here's the code. the error appears here in line 35, in the where statement.
<?
$mysql_server_address = "cygnus.zac.unac.mx";
$user = DBA;
$pass = SQL;
$db = ("canon");
$link = mysql_connect($mysql_server_address, $user, $pass)//, $mysql_user, $mysql_password)
or die("No se pudo conectar a la base de datos");
mysql_select_db($db,$link)
or die("No existe la base de datos");
$val = $_GET['id'];
$query = mysql_query("SELECT canon.can_idcanon, salon.sal_numero, salon.sal_edificio, canon.can_marca,
canon.can_modelo, canon.can_lumin, canon.can_status
FROM canon, salon
where canon.sal_numero = salon.sal_numero AND id=$val", $link);
echo "<table width=100% border=1>";
echo "<tr>
<td>CAÑON</td>
<td>SALON</td>
<td>EDIFICIO</td>
<td>MARCA</td>
<td>MODELO</td>
<td>HORAS LAMPARA</td>
<td>STATUS</td>
</tr>";
while ($a_row = mysql_fetch_array($query)) {
print $a_row["can_marca"];
}
?>