<?php include "../../root.class.php";
$db = new db_safeguard();

$serial_number = $_GET['serial_number'];
$check_non_stock = $db->query("non_stock", "SELECT * FROM non_stock WHERE serial_number = '$serial_number' AND in_stock = 1");
if ($check_non_stock->num_rows > 0) {
    $non_stock = $check_non_stock->fetch_assoc();
    echo $non_stock['name'] . "|" . $non_stock['record_id'];
} else {
    echo 0;
}
