You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
361 B
17 lines
361 B
<?php
|
|
|
|
require_once("../conn.php");
|
|
|
|
$model = $_GET['model'];
|
|
|
|
$sql_str = "SELECT id, model, price FROM facility_price WHERE model = :model ORDER BY id DESC";
|
|
$stmt = $conn->prepare($sql_str);
|
|
$stmt->bindParam(':model', $model);
|
|
$stmt->execute();
|
|
$el = $stmt->fetch(PDO::FETCH_ASSOC);
|
|
if($el){
|
|
$price = $el['price'];
|
|
}else{
|
|
$price = null;
|
|
}
|
|
echo $price;
|