I am getting the following error:
Warning: OCIStmtExecute: ORA-00936: missing expression in /u04/web/shopatron/pages/Dev/index.phtml on line 61
That I am not able to understand why. I am believe that I am passing it all of the correct parameters but still I get an error. ANy help would be greatly appreciated.
line 61 is:
$exec = OCIExecute($sql_st);
from the following code block:
$sql = "select distinct category from product p, mfg_relations mr
where p.mfg_id = mr.mfg_id1
and p.deleted = 'N'
and mr.mfg_id = $mfg_id
and mr.restriction = 'only'
and ((mr.affected_level = 'category' or p.category = mr.affected_unit)
or(mr.affected_level = 'all')
or(mr.affected_level = 'subcategory' and p.subcategory = mr.affected_unit)
or(mr.affected_level = 'item' and p.product_id = mr.affected_unit)
)
and (Select distinct category from product
where mfg_id = $mfg_id
and deleted = 'N')
order by category";
$sql_st = OCIParse($conn,$sql);
$exec = OCIExecute($sql_st);
$col = 0;
while (OCIFetchInto($sql_st, $row, OCI_ASSOC)) {
$category=$row[CATEGORY];
if ($col == 0) { echo "<tr>";} else {echo "<td width = 20> </td>";}
echo "<td>$font<A HREF='http://www.phpbuilder.com/board/archive/index.php/$server_url/sub_category.phtml?category=".urlencode($category)."'>$row[CATEGORY]</A></font></td>";
if ($col == 1) {
echo "</tr>";
$col = 0;
} else {
$col = 1;
}
}
Warning: OCIStmtExecute: ORA-00936: missing expression in /u04/web/shopatron/pages/Dev/index.phtml on line 61
That I am not able to understand why. I am believe that I am passing it all of the correct parameters but still I get an error. ANy help would be greatly appreciated.
line 61 is:
$exec = OCIExecute($sql_st);
from the following code block:
$sql = "select distinct category from product p, mfg_relations mr
where p.mfg_id = mr.mfg_id1
and p.deleted = 'N'
and mr.mfg_id = $mfg_id
and mr.restriction = 'only'
and ((mr.affected_level = 'category' or p.category = mr.affected_unit)
or(mr.affected_level = 'all')
or(mr.affected_level = 'subcategory' and p.subcategory = mr.affected_unit)
or(mr.affected_level = 'item' and p.product_id = mr.affected_unit)
)
and (Select distinct category from product
where mfg_id = $mfg_id
and deleted = 'N')
order by category";
$sql_st = OCIParse($conn,$sql);
$exec = OCIExecute($sql_st);
$col = 0;
while (OCIFetchInto($sql_st, $row, OCI_ASSOC)) {
$category=$row[CATEGORY];
if ($col == 0) { echo "<tr>";} else {echo "<td width = 20> </td>";}
echo "<td>$font<A HREF='http://www.phpbuilder.com/board/archive/index.php/$server_url/sub_category.phtml?category=".urlencode($category)."'>$row[CATEGORY]</A></font></td>";
if ($col == 1) {
echo "</tr>";
$col = 0;
} else {
$col = 1;
}
}