add stations
This commit is contained in:
@@ -154,4 +154,15 @@ function write_points($con, $s_id, $m_id, $points, $time) {
|
||||
} catch(PDOException $e) {
|
||||
handle_pdo_exception($e);
|
||||
}
|
||||
}
|
||||
|
||||
function write_station($con, $station_name, $station_pos) {
|
||||
try {
|
||||
$stmt = $con->prepare("INSERT INTO Station (name, standort) VALUES (?, ?)");
|
||||
$stmt->bindParam(1, $station_name, PDO::PARAM_STR);
|
||||
$stmt->bindParam(2, $station_pos, PDO::PARAM_STR);
|
||||
$stmt->execute();
|
||||
} catch(PDOException $e) {
|
||||
handle_pdo_exceptio($e);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user