Jump to content

how to lay this idea out?


MSUK1

Recommended Posts

how do would i create a database where data would be linked together. here is the structure i want, and the idea i just dont know how to impliment it. im good with creating single databases with many fields, but no clue about many databases with relevant fields?

 

okay so, i have a client area, all the clients details are stored in one table. i want then a table that has the clients projects in it, and if i want to add a new project of the clients i can.

 

so here are the fields for the first table i have already setup:

  `userid` varchar(65) collate latin1_general_ci NOT NULL,
  `company` varchar(65) collate latin1_general_ci NOT NULL,
  `firstname` varchar(65) collate latin1_general_ci NOT NULL,
  `lastname` varchar(65) collate latin1_general_ci NOT NULL,
  `email` varchar(65) collate latin1_general_ci NOT NULL,
  `tel` varchar(65) collate latin1_general_ci NOT NULL,
  `address` text collate latin1_general_ci NOT NULL,
  `websites` varchar(65) collate latin1_general_ci NOT NULL,
  `username` varchar(65) collate latin1_general_ci NOT NULL,
  `password` varchar(65) collate latin1_general_ci NOT NULL,
  `clientid` int(4) NOT NULL,
  `userlevel` tinyint(1) NOT NULL,
  `timestamp` int(11) NOT NULL,
  `ip` varchar(15) collate latin1_general_ci NOT NUL

 

clientid is what i want to be the clients global identifier

 

maybe even what i have done so far is wrong..

 

then for the projects table

 

i would like each client to have

 

project name

project image [image url that displays on their dashboard]

start and expiry date

 

-----------------------

so how can i have this linked to the clients id

 

so that i can display it on a php page relevantly..

 

 

[thats the next question] in the php part i was hoping to use a query that returns only the clientid, which it would get from the first table

 

ahh confusing?

 

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.