Jump to content

Tables within DB: if table is populated then do this...


Mouse

Recommended Posts

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 thanks

Mouse

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.