but still.. its confusing.. cuz he's saying "WHERE var1=var2
and when u dont put a dollar sign infront ($), then it reads it as a DB variable
so what would the point of comparing DB variables??
oh well
i think he's comparing the values of tables not variables
anyways, this line confuses me....
Code: Select all
<php
$select=mysql_query("select * from category, subcategory, catalog where category.c_id=subcategory.cat_id and subcategory.s_id=catalog.sub_id and catalog.pr_id=$id", $link)or die('Query failed due to '.mysql_error());
?>
I assume the $link if your connection to the database, but why call it ? you already have a pconnect called uptop that keeps the connection alive no matter what. also, there is no reason to be sending that username/password to it again (which, again i'm assuming is what $link is for ).
Also, when calling variables inside a query, i usually escape out like this ( and this is without the $link variable cuz i don't think you need it )
Code: Select all
<?php
$select=mysql_query("select * from category, subcategory, catalog where category.c_id=subcategory.cat_id and subcategory.s_id=catalog.sub_id and catalog.pr_id='".$id."'")or die('Query failed due to '.mysql_error());
?>
try that, and see if it works. there might be something else i'm missing here...i'll post it if i find it