You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thank you for the outstanding project. Unfortunately, my SQL skills are very limited right now, which is why I need help.
I'm trying to figure out how to use the steps component to paginate the posts (using the example modeling a many-to-many relationship with a form), but I can't figure it out. Any help would be greatly appreciated.
In my case post.id is not in order.
SELECT*FROM sqlpage_shell LIMIT1;
SELECT'list'AS component,
COALESCE(
(SELECT name FROM topic WHERE id = CAST($topic ASINTEGER)),
'Recent blog posts'
) AS title;
SELECTpost.titleAS title,
'post.sql?id='||post.idAS link,
'Published on '|| created_at AS description,
CASE
WHEN created_at > (current_timestamp- interval '2 days') THEN 'red'
ELSE NULL
END AS color,
topic.iconAS icon,
created_at > (current_timestamp- interval '2 days') AS active
FROM post
LEFT JOIN topic ONtopic.id=post.main_topic_idWHERE $topic IS NULLORtopic.id= CAST($topic ASINTEGER)
OR EXISTS (
SELECT1FROM topic_post
WHEREtopic_post.topic_id= CAST($topic ASINTEGER)
ANDtopic_post.post_id=post.id
)
ORDER BY created_at DESC;
SELECT'text'AS component;
SELECT'No blog post yet. 'AS contents WHERE NOT EXISTS (SELECT1FROM post);
SELECT'Write a post !'AS contents, 'write.sql'AS link;
Hello ! You should have a look at this forum entry: #39 and this open issue: #84, with examples. Don't hesitate to ask there if there is something that is not clear.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi, thank you for the outstanding project. Unfortunately, my SQL skills are very limited right now, which is why I need help.
I'm trying to figure out how to use the steps component to paginate the posts (using the example modeling a many-to-many relationship with a form), but I can't figure it out. Any help would be greatly appreciated.
In my case post.id is not in order.
All reactions