I am having problem when querying data from 3 tables (FABRICATION, FABRICATION_QC, AND WEIGHT)
and using their values in the PHP. My query is like this:
select fabrication.*,master_drawing.weight,
(select fabrication_qc.marking_qc from fabrication_qc where fabrication_qc.head_mark=fabrication.head_mark) MARKING_QC,
(select fabrication_qc.marking_qc_date from fabrication_qc where fabrication_qc.head_mark=fabrication.head_mark) MARKING_QC_DATE,
(select fabrication_qc.marking_qc_sign from fabrication_qc where fabrication_qc.head_mark=fabrication.head_mark) MARKING_QC_SIGN
from fabrication,fabrication_qc,master_drawing
where fabrication.head_mark = master_drawing.head_mark";
and when I do this in the PHP to get that data into a table,
while (($row = oci_fetch_array($fabParse, OCI_BOTH)) != false)
{
echo '<tr>';
echo '<td>'.$row['PROJECT_NAME'].'</td>';
echo '<td>'.$row['HEAD_MARK'].'</td>';
echo '<td>'.$row['ID'].'</td>';
var_dump($row['MARKING_QC']);
PROJECT_NAME
, HEAD_MARK
, and ID
work fine. Only the dumped MARKING_QC
shows NULL
in the output.
Can anyone tell me what I'm doing wrong here?