Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9113777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:02:37+00:00 2026-06-17T04:02:37+00:00

A user can create a form that allows other users to register. So, if

  • 0

A user can create a form that allows other users to register. So, if a user creates a form, he can also register on said form.

Say I have the following tables

//Form 
id | title  | entry             | userid
1     test     entry for form        1

//form_register - Allows users to register for a particular form, form_id references form.id
form_id | userid
   1        1
   1        1
   1        2
   1        2

Now, suppose I want to generate a list for forms users have created AND signed up for. Users can sign up for the same form more than once, but I only want to display the form once. I don’t want a list of every single time a user signs up for, only a list of the forms they signed up for, not the actual signups.

If a user creates a form, then signs up for that same form 2 times I only want the form information to display 1 time. My current query displays the form info 3 times (one for creating, 2 for registering).

    SELECT form.*, form_register.* FROM forms
    INNER JOIN form_register on form_regiseter.form_id = form.id
    WHERE form_register.userid = '$userid'

When this query runs for user 1, it generates the following

Title  
test
test
test

I just want it to display the form once like this

Title
test

For userid2 this would be the output

Title
test
test

And I want it to be

Title
test
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T04:02:38+00:00Added an answer on June 17, 2026 at 4:02 am
    SELECT DISTINCT form.*, form_register.* FROM forms
        INNER JOIN form_register on form_regiseter.form_id = form.id
        WHERE form_register.userid = '$userid' 
    

    may be what you’re looking for

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form on a page that a user can use to create
I have setup a form that allows a user to make selections from drop-down
I have the following code on a page where users can create posts: <script>
I would like to create a form where a user can enter an arbitrary
A user can create a post. Posts have comments. A comment must belong to
So, I'm building a form that my users can customize based on their needs,
I'm trying to build a form that allows users to update some records. They
I am trying to create an application that allows the user to search a
I am implementing (considering it actually) a control that allows users to create a
In my application user can create post,however only the creator of the post can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.