Jump to content

Recommended Posts

Hey guys, I've moved onto learning Relational Database Design now, and - at the mo', getting my head confuzzled. =[

 

i have 3 tables:

db.jpg

Named accordingly.

 

I then have the client.php profile page - this being the current code:

$ClientId = $_GET['ClientId'];

$sql = "SELECT * FROM Client WHERE ClientId = $ClientId";  
$result = mysql_query($sql);


while($ClientInfo = mysql_fetch_array($result))
{
echo "<strong>Name:</strong> {$ClientInfo['ClientName']} - <strong>Category:</strong> <br /><br />";
echo "<img src='./images/headshots/{$ClientInfo['ClientPic']}.jpg' name='{$ClientInfo['ClientName']}' /><br /><br />";
echo "<strong>Bio:<br /></strong> {$ClientInfo['ClientBio']}<br /><br />";
echo "Link Exchange: <br /><a href='{$ClientInfo['ClientExchange']}'>Click To Visit {$ClientInfo['ClientName']}'s Site</a><br /><br />";
echo "Demo:<br /> <a href='./demos/{$ClientInfo['ClientDemo']}.mp3'>Click Here For {$ClientInfo['ClientName']}'s Demo</a><br /><br />";

}

 

::Please excuse the messy DB design, and this that and the other, I know there are rules of thumb here - but im learning =]::

 

So yea, I want to have another page where all clients are listed in categories, so - how would i go about that?

But, saying that, the above code is 'Ok' when getting the clients information, but what about trying to retrieve the category that the client is in?

 

Its hurts my brain - =[

 

Thanks in advanced for the help

Link to comment
https://forums.phpfreaks.com/topic/111519-relational-database-understanding/
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.