Error performing query: " . mysql_error() . "

"); exit(); } while($row = mysql_fetch_array($query)) { $origin_code=$row["airport_code"]; $origin_country=$row["country"]; } ?> <?php eval('echo "' . addslashes(gettext('Low Cost Flights departing from $origin_name, $origin_country')) . '";'); ?> \n"; ?>

&result=Fail&errormsg="; echo ("

Failed to connect to MySQL server.

"); echo "&"; exit; } // Attemp to select DB if (mysql_select_db("lcag_airlines") == false) { echo "&result=Fail&errormsg="; echo ("

Error selecting database." . "

"); echo ("

Error: " . mysql_error($link). "

"); exit; } $query = @mysql_query("SELECT airports.airport_code FROM airports WHERE airports.airport_name='$origin_name' "); if (!$query) { echo("

Error performing query: " . mysql_error() . "

"); exit(); } while($row = mysql_fetch_array($query)) { $origin_code=$row["airport_code"]; } $query = @mysql_query("SELECT DISTINCT routes.from_code, routes.to_code, routes.airline_code, airlines.name, airlines.website_full, airlines.website_display, origin.airport_name AS origin_name, destination.airport_name AS destination_name, destination.country AS destination_country, origin.country AS origin_country FROM routes, airlines, airports AS origin, airports AS destination WHERE routes.from_code='$origin_code' AND airlines.ICAO_code = routes.airline_code AND destination.airport_code = routes.to_code AND origin.airport_code = routes.from_code ORDER BY destination.country, destination_name "); if (!$query) { echo("

Error performing query: " . mysql_error() . "

"); exit(); } if (mysql_num_rows($query) == 0){ echo "

Sorry! We are not currently currently aware of any low cost airlines providing flights from {$origin_name}, but this page is updated daily so please check back again soon. You can also check the availability of {$origin_country} flights departing other airports.

\n"; //echo "
"; } $printed_header="0"; $printed_country="0"; while($row = mysql_fetch_array($query)) { $from_code=$row["from_code"]; $airline_code=$row["airline_code"]; $airline_name=$row["name"]; $website_full=$row["website_full"]; $website_display=$row["website_display"]; $origin_name=$row["origin_name"]; $destination_name=$row["destination_name"]; $destination_country=$row["destination_country"]; $origin_country=$row["origin_country"]; $to_code=$row["to_code"]; if($printed_header == "0") { echo "

Low cost flights from " . $origin_name . ", " . $origin_country . "

\n"; $printed_header="1"; } if($printed_country != $destination_country) { echo "
\n"; echo "

Flights departing from " . $origin_name . ", " . $origin_country . " to " . $destination_country . ":

\n"; $printed_country=$destination_country; } $airline_website="{$website_display}"; echo "

\n"; eval('echo "' . addslashes(gettext(' Fly from $origin_name ($from_code) to $destination_name ($to_code) with $airline_name ($airline_website)')) . '";'); echo "

\n"; } ?>

Scroll to Top