How to display data form one db table to another db table's view page in php?
<p>I have 2 db tables aspect &amp; aspectdet_1. Each have Add, View, Edit &amp; Delete pages.</p>

<p>Table: <code>aspect</code> has rows <code>ascode</code> &amp; <code>asname</code>.</p>

<p>Table: <code>aspectdet_1</code> has rows <code>Dept_Code</code>, <code>ascode</code>, <code>astype</code>, <code>cndtn</code> &amp; <code>asscope</code>.</p>

<p>I want to display <code>asname</code> from Table:<code>aspect</code> in  Table: <code>aspectdet_1</code>'s view page. 
I used the code</p>

<pre><code>$query="SELECT aspectdet_1.Dept_Code, aspectdet_1.ascode, aspectdet_1.astype, aspectdet_1.cndtn, aspectdet_1.asscope, aspect.asname ".
    "FROM aspectdet_1, aspect ".
    "WHERE aspectdet_1.ascode = aspect.ascode ";
</code></pre>

<p>It works in view page.</p>

<p>But when I want to edit or delete that pages not supporting. </p>

<p>Is that code right?</p>

<p>What to do for edit &amp; delete?</p>
