Jump to content

Relational MySql


princeofpersia

Recommended Posts

Hi Guys

 

I have two table in mysql one is users and the second one is profiles

 

my database name is movies

 

users contains: users_id, username, password, email

 

movies contains: id, user_id, name, movie_name, movielink

 

 

I need users to login and then update their profile according to relational database setup

 

so once user loggs in they can add the link of their movies to the database.

 

 

Could some one help me with inserting data into relational database according to database setup I have introduced above?

 

Appreciate your help in advance ;)

Link to comment
Share on other sites

Your structure is wrong (probably).  What you really want is a table for Users (userid, username, etc) and atable for Movies (movieid, movieName, etc).  Then you want a cross-reference table that has movieId and userId.  This way, you're not duplicating the movie titles.  If 100 people like The Matrix, using your method you'd have 100 instances of the title "The Matrix" in your table.  Using mine, you'd only have one (plus 100 cross-reference rows).

 

Now, if you're asking "how do I go about making a dynamic website such as this," there are plenty of PHP tutorials out there.

 

-Dan

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.