Next.js Discord

Discord Forum

how to fetch those cards only that are created by the user

Answered
Western harvester ant posted this in #help-forum
Open in Discord
Western harvester antOP
these are my table columns - id,name,title,company,phone,email,website,address,twitter,linkedin,github,created_at,slug, also i am using clerk for auth.
Answered by Western harvester ant
Yeah actually I solved it, I did it this way first i stored the user_id when creating card.. then in view card I used user_id and clerk userID to filter cards
View full answer

2 Replies

@Western harvester ant these are my table columns - id,name,title,company,phone,email,website,address,twitter,linkedin,github,created_at,slug, also i am using clerk for auth.
Do you have any references in the business_cards table for the user? Use this reference to find the cards that belong to the user and get them.

from -> select -> where (userid id)
@Losti! Do you have any references in the business_cards table for the user? Use this reference to find the cards that belong to the user and get them. from -> select -> where (userid id)
Western harvester antOP
Yeah actually I solved it, I did it this way first i stored the user_id when creating card.. then in view card I used user_id and clerk userID to filter cards
Answer