Page 1 of 1

Echoing results of double query

Posted: Mon Nov 24, 2003 8:41 am
by Perfidus
How is the best way to echo the results of this query?
I have been trying this but it doesn't seem to work:
<? echo $row["Precios.ene3"]; ?>

This is the query:

Code: Select all

$result=mysql_query("SELECT Disponibilidad.ene1, Disponibilidad.ene2, Disponibilidad.ene3, Disponibilidad.ene4, Disponibilidad.ene5, Disponibilidad.feb1, Disponibilidad.feb2, Disponibilidad.feb3, Disponibilidad.feb4, Disponibilidad.feb5, Disponibilidad.mar1, Disponibilidad.mar2, Disponibilidad.mar3, Precios.ene1, Precios.ene2, Precios.ene3, Precios.ene4, Precios.ene5, Precios.feb1, Precios.feb2, Precios.feb3, Precios.feb4, Precios.feb5, Precios.mar1, Precios.mar2, Precios.mar3, FROM Disponibilidad, Precios WHERE (Disponibilidad.Ref='$Ref' AND Precios.Ref='$Ref')",$link);

Posted: Mon Nov 24, 2003 9:34 am
by twigletmac
Have you done:

Code: Select all

while ($row = mysql_fetch_assoc($result)) {
    echo '<pre>';
    print_r($row);
    echo '</pre>';
}
after the query to check what's in it - i.e. what the element names are?

Mac