Buenas tardes necesito ayuda urgente. tengo que pasar un código que esta e mysql a PDO.Os pongo el código de la funcion cancelar a ver si me podeis ayudar:
function cancelReservation($IID){
$connection = initDB();
$query2;
$query2 = "SELECT * FROM Itinerary WHERE IID='".$IID."'";
$result2 = mysql_query($query2);
//or die ("Query Failed ".mysql_error());
$SID;
while($row2 = mysql_fetch_array($result2)){
$SID = $row2['SID'];
}
//Remove Itinerary information
$query2 = "DELETE FROM Schedule WHERE SID='".$SID."'";
$result2 = mysql_query($query2);
//or die ("Query Failed ".mysql_error());
//Remove Schedule information
$query2 = "DELETE FROM Itinerary WHERE IID='".$IID."'";
$result2 = mysql_query($query2);
//or die ("Query Failed ".mysql_error());
$db=null;
return 0;