I am just beginning, the following queries work but they seem to long and messy. How can I make these queries shorter?
Here is my code:
if ($result = $mysqli->query("select bestelling.datum,klant.klant_code,klant.adres,klant.naam,reis.bestemming,reis.klasse,reis.prijs_in_euro,reis.geannuleerd from klant,reis,bestelling where bestelling.bestelling_code = klant.klant_code and klant.klant_code = reis.reis_code"))
if ($stmt = $mysqli->prepare("UPDATE bestelling,klant,reis SET datum = ?, naam = ?, adres = ?, bestemming = ?, klasse = ?, prijs_in_euro = ?
WHERE klant.klant_code=? and bestelling.bestelling_code = klant.klant_code and klant.klant_code = reis.reis_code"))
if($stmt = $mysqli->prepare("SELECT * FROM bestelling,klant,reis WHERE klant.klant_code=? and bestelling.bestelling_code = klant.klant_code and klant.klant_code = reis.reis_code"))