@@ -364,6 +364,8 @@ function handleComments($method, $id, $db) {
|
||||
}
|
||||
|
||||
function handleNodes($method, $id, $db) {
|
||||
// Ensure node_notes table exists
|
||||
try { $db->exec("CREATE TABLE IF NOT EXISTS node_notes (node_id INT, notes TEXT DEFAULT '')"); } catch (Exception $e) {}
|
||||
switch ($method) {
|
||||
case 'GET':
|
||||
echo json_encode($db->query("SELECT n.*, nn.notes FROM network_nodes n LEFT JOIN node_notes nn ON n.id = nn.node_id ORDER BY n.group_name, n.label")->fetchAll(PDO::FETCH_ASSOC));
|
||||
|
||||
Reference in New Issue
Block a user