Mouse Posted December 6, 2006 Share Posted December 6, 2006 I have a problem, which I am sure is easy enough to work out but hey, if only my PHP skills were better!Problem. Have a look at my member profile page [http://mouse.nodstrum.com/full_profile.php?u=11], in the top right hand corner is the “Tim’s Time With Disney” box… I want to add the content dynamically.In the Database there are six relevant tables, A, B, C, D, E, and F and each of them has the following contents:[code] # Dump of table A `did` int(9) NOT NULL auto_increment, `uid` int(9) NOT NULL default '0', `start` int(4) NOT NULL default '0', `finish` int(4) NOT NULL default '0', `Job1` int(1) NOT NULL default '0', `Job2` int(1) NOT NULL default '0', `Job3` int(1) NOT NULL default '0', `Job4` int(1) NOT NULL default '0', `Job5` int(1) NOT NULL default '0', PRIMARY KEY (`did`) ) TYPE=MyISAM;[/code]What I (think I) am aiming to do is roughly…Look in table a >> are there values in ‘Start’ and ‘finish’ >> if so, then put in the right logo >> on the next line echo $start & $finish >> list the ‘jobs’ where there is a ‘1’ not a ‘0’ >> move on to the next table and repeat.If a PHP guru type could give me a pointer or two I’ll go on to do the rest.As I have said before, I hate asking for code, but as a dyslexic learning to write new stuff is a bugger and I need a few pointers.Many thanksMouse Quote Link to comment Share on other sites More sharing options...
trq Posted December 6, 2006 Share Posted December 6, 2006 That seems to be some really poor database design issues your having there. I would strongly suggest looking for a tutorial on [i]database normalization[/i] before continuing down the path you are on. Quote Link to comment Share on other sites More sharing options...
Psycho Posted December 6, 2006 Share Posted December 6, 2006 If all the tables contain the same fields, then you should just use one table and add a column to indicate A, B, C, D, E, or F. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.