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 8021317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:56:36+00:00 2026-06-04T21:56:36+00:00

I have a users table. I have a certifications table. Each user can have

  • 0

I have a users table.
I have a certifications table.

Each user can have multiple certifications. Certifications has a user_id foreign key.

  1. How may I select a user as well as all of their certifications in one query?
  2. How may I select users that have certifications?

users table:

CREATE TABLE `users` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `username` varchar(24) default NULL,
  `displayname` varchar(24) default NULL,
  `email` varchar(64) default NULL,
  `password` text,
  `signup_date` int(11) default NULL,
  `signup_ip` varchar(15) default NULL,
  `hash` text,
  `verified` tinyint(1) default '0',
  `last_login` int(11) default NULL,
  `logins` int(11) default NULL,
  `status` text,
  `recovery_hash` text,
  `recovery_initiated` int(11) default NULL,
  `last_updated` int(11) default NULL,
  `signup_method` text,
  `signup_question` int(11) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

certifications table:

CREATE TABLE `certifications` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `user_id` int(11) unsigned NOT NULL,
  `number` varchar(128) default NULL,
  `board` varchar(128) default NULL,
  `company` varchar(128) default NULL,
  `website` varchar(128) default NULL,
  PRIMARY KEY  (`id`),
  KEY `user_id` (`user_id`),
  CONSTRAINT `certifications_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

Thank you for reading.

  • 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-04T21:56:38+00:00Added an answer on June 4, 2026 at 9:56 pm

    How may I select a user as well as all of their certifications in one query?

    SELECT *
    FROM certifivations C
    LEFT JOIN users U
    ON C.user_id = U.id
    WHERE U.id=USERID
    

    How may I select users that have certifications?

    SELECT *
    FROM certifivations C
    JOIN users U
    ON C.user_id = U.id
    GROUP BY U.id
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a users table, and each user has a unique user_id . Each
I have a table users with primary index userId . Currently, each user has
I have a USERS table. Each user has connections in a CONNECTIONS table. Each
Scenario: We have 5 users. (users table) Each user has up to 10 imgs.
I have a table users which has a primary key userid and a datetime
I have a database table called users with a primary key of user_id for
i have users table and i have posts table i want select from users
I have a users table in a database, where the user enters a form
I have two models, Users and Groups. Each group can have many users and
I have users list table how i can navigate on url: ../users/showprofile?userid= I want

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.