Hello,
I'm afraid that there aren't other methods to get data from a custom table without ID. We also use the SQL query to get the data, please check this function
private static function query_get( int $object_id, string $table ): array {
global $wpdb;
$row = $wpdb->get_row(
$wpdb->prepare(
"SELECT * FROM $table WHERE <code>ID</code> = %d",
$object_id
),
ARRAY_A
);
return is_array( $row ) ? $row : [];
}
file /wp-content/plugins/meta-box-aio/vendor/meta-box/mb-custom-table/src/Cache.php