Thread: [Solved] Retrieve data from sql
View Single Post
Author Message
Rohanlogs
Senior Member
Join Date: Nov 2015
Old 05-04-2024 , 11:07   Re: Retrieve data from sql
Reply With Quote #1

I just tested this with a local SQLite database, and it seems that AMXX has such an old version of SQLite that it doesn't support CTE's (common table expressions), or window functions like RANK(). I did some research and these features were introduced in SQLite after 2013, so that's probably why you're seeing the syntax error.

I checked the SQLite version of AMXX 1.9.0:

Code:
format( sQuery, charsmax(sQuery), "SELECT sqlite_version();");
-> 
L 05/04/2024 - 17:59:07: [zm_rank.amxx] Current version of SQLite: 3.24.0
CTEs were indroduced from version 3.8.3, and window functions were introduced in 3.25.0.


I've simplified the query, I replaced all the newer functions with subqueries that should be compatible with almost any version of SQLite, so try this:

Spoiler
__________________
Rohanlogs is offline