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