EDIT: after looking through all the suggestions here and still coming up with no result I changed the database (to a standard osCommerce one) and got a result. Switch back to the downloaded database - no result. Comparing the two showed no structural differences (other than a few extra fields in the live one) Re-exported the live database to my test computer and - voila! Result now shows.
I have no idea what was wrong with the original db - thanks to all for their replies.
Baffled here: I am looking at a bunch of code written in PHP4 but running under PHP5 - the code (abridged) looks like:
$pid=(int)$customer_exists['pid'];//this value comes from an earlier query & does exist
$query2 = mysql_query("SELECT * FROM `products` AS p, `products_description` AS pd WHERE pd.products_id=p.products_id AND p.products_id='".(int)$pid." '" );
This gets no result from the database. If the first line is changed to $pid=28; or if the query is changed to just search one table then we get a result.
Echo out $pid before and after the query will echo the value assigned in line 1
(have tried many versions of the actual $query2 - all get the same non-result)
What am I missing here?
Thank you
Graeme