Skip to content

Commit 963ec10

Browse files
committed
Add missing FROM clause to query example
1 parent 709ffb6 commit 963ec10

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/official-site/sqlpage/migrations/47_link.sql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ In `index.sql`, you can use the `link` function to generate the URL of the produ
2222
select ''list'' as component;
2323
select
2424
name as title,
25-
sqlpage.link(''product'', json_object(''product_name'', name)) as link;
25+
sqlpage.link(''product'', json_object(''product_name'', name)) as link
26+
from products;
2627
```
2728
2829
Using `sqlpage.link` is better than manually constructing the URL with `CONCAT(''product?product_name='', name)`,
@@ -72,4 +73,4 @@ VALUES
7273
'fragment',
7374
'An optional fragment (hash) to append to the URL to link to a specific section of the target page.',
7475
'TEXT'
75-
);
76+
);

0 commit comments

Comments
 (0)