<?php
require_once __DIR__ . '/../../connect.php';

$sql = "SELECT * FROM `canecl`";
$stmt = $con->prepare($sql);
$stmt->execute();

$result = $stmt->fetchAll(PDO::FETCH_ASSOC);

if ($stmt->rowCount() > 0) {
    jsonSuccess($result);
} else {
    jsonError("No records found");
}
?>