Jump to content

Archived

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

scarezekiel

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

Share this post


Link to post
Share on other sites

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