I need to create a single select statement that gets values from one table based on data in another table.
The first table (prodcategories) has this structure (columns)
The existing SQL statement I deed to modify is this:
"select * from clienttype where companyid='$companyid'";
I need to modify this so that it is like the following "pseudo" SQL statement:
SELECT * from clienttype where companyid = '$companyid' and clientcategoryid = (SELECT clientcategory from prodcategories where category = "xxx").
Can you show me the proper MySQL syntax?