diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a708267..c7418eb5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - querying CSV data from SQLPage with [vsv](https://github.com/nalgeon/sqlean/blob/main/docs/vsv.md), - or building a search engine for your data with [FTS5](https://www.sqlite.org/fts5.html). - Breaking: change the order of priority for loading configuration parameters: the environment variables have priority over the configuration file. This makes it easier to tweak the configuration of a SQLPage website when deploying it. + - Fix the default index page in MySQL. Fixes [#23](https://github.com/lovasoa/SQLpage/issues/23). ## 0.7.2 (2023-07-10) diff --git a/index.sql b/index.sql index 21daf6e8..bc41837e 100644 --- a/index.sql +++ b/index.sql @@ -67,7 +67,7 @@ select 'chart' as component, 'Collatz conjecture' as title, 'area' as type; WITH RECURSIVE cnt(x, y) AS ( - VALUES(0, 15) + SELECT 0, 15 UNION ALL SELECT x + 1, CASE @@ -99,7 +99,7 @@ select 'card' as component, 5 as columns; WITH RECURSIVE cnt(x) AS ( -- cnt is a table that contains the numbers from 1 to 10 - VALUES(1) + SELECT 1 UNION ALL SELECT x + 1 FROM cnt @@ -121,7 +121,7 @@ FROM cnt as a, WHERE -- The powerful thing is here $x IS NULL OR -- The syntax $x allows us to extract the value 'a' when the URL ends with '?x=a'. It will be null if the URL does not contain '?x=' - b.x = $x::INTEGER; + b.x = $x::DECIMAL; -- So when we click the card for "a times b", we will reload the page, and display only the multiplication table of a --------------------------- -- FORMS --