Jump to content

sql yog..help pls


Recommended Posts

okay so my current problem is my table only shows this

 

photo 1..

 

this is the code

 

this is the one need to be changed


<?
$query="SELECT * FROM tbllocation where districtid = '$district'";

        $result=mysql_query($query);
while($row=mysql_fetch_array($result)) { 
$code = $row['code'];
$description = $row['description'];
    $districtid = $row['districtid'];    
echo "<tr><td>$code</td>";
echo "<td>$description</td></tr>";
echo "<td>$districtid</td></tr>";


}
?>

 

 

okay based on photo 1..i need to change the districtid with description from another table that is called tbldistrict

 

photo2(tbllocation)

photo3(tbldistrict)

 

okay so i need the DESCRIPTION from tbldistrict to replace DISTRICTID as in photo 1..

 

 

how do i do the query..n the codes to display it. please teach me. im new..

post-131669-13482403581914_thumb.jpg

post-131669-13482403582119_thumb.jpg

post-131669-13482403582283_thumb.jpg

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.