synonim pages and new dump
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
include('../include/headscript.php');
|
||||
include("../class/company.php");
|
||||
$conn = new mysqli($servername, $username, $password, $database);
|
||||
if (isset($_POST['id'])) {
|
||||
$refid = $_POST['id'];
|
||||
|
||||
// Recupera i sinonimi per il composto specifico
|
||||
$stmt = $conn->prepare("SELECT * FROM compundsvocabulary WHERE refid = ? AND preferred = 'N'");
|
||||
$stmt->bind_param('i', $refid);
|
||||
$stmt->execute();
|
||||
$result = $stmt->get_result();
|
||||
|
||||
$data = [];
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
$data[] = $row;
|
||||
}
|
||||
|
||||
echo json_encode($data);
|
||||
} else {
|
||||
echo json_encode(['success' => false, 'error' => 'Invalid input']);
|
||||
}
|
||||
Reference in New Issue
Block a user