Thread: Confused
View Single Post
Old 06-11-2006, 03:59 PM   #2 (permalink)
etono
Moderator
 
Join Date: May 2006
Posts: 86
Default Re: Confused

I didn't immediatly see anything wrong. Perhaps it is the way you are looping through your array? Try this code, and let me know if it is giving you what you want.
PHP Code:
<?php
//assuming connection is made
$sql "SELECT Flight_Number, Departure_ICAO, Arrival_ICAO, Departure_Time
        FROM flights1
        WHERE Aircraft = 'Dash 8 300'
        ORDER BY Flight_Number ASC
        LIMIT 0, 30"
;
$result mysql_query$sql );
while( 
$row mysql_fetch_array$resultMYSQL_ASSOC ) ) {
    echo 
"Flight Number: {$row['Flight_Number']}<br />Departure ICAO: {$row['Departure_ICAO']}<br />Arrival ICAO: {$row['Arrival_ICAO']}<br />Departure Time: {$row['Departure_Time']}";
}
?>

I have had troubles in the past with quoting of SQL statements so I always use the form wrote above where only values are single quoted and table fields are not quoted at all. Please repost if this solves your problem, or let me know that it is still not working.
__________________
Jeremy Moseley
My Links: Design Related Blog | Personal Website | Portfolio
etono is offline   Reply With Quote
Sponsored Links