Hi all, I'm new to PHP and am doing a project with a php generator called PHPRunner and I have a design of the database in which the first table is the master of the second, the second of the third and the third of the quarter as follows:

CategoryID (key)

CategoryID (foreign key)
Idsubcategoria (key)
Subcategory Name

CategoryID (foreign key)
Idsubcategoria (foreign key)
ProductID (key)
Product Name

CategoryID (foreign key)
Idsubcategoria (foreign key)
ProductID (foreign key)
Idsubproducto (key)

What I'm trying to make is that by displaying the list of categories you can click on the photo and take me to the deployment of sub-categories containing that record, that's why I have this code that works:

$ Value = "<a href = subcategorias_list.php?mastertable=categories&masterkey1 =". $ Data ["CategoryID"]. "> <img Src=".$value." border=0> </ a>";

But when I want to do the same in the next level in the deployment of the subcategories and wanting to do the same with the picture of the subcategory and take me to the product list containing in this particular record I don't know how to do it, in other words I don't know how to use masterkey1 and masterkey2
I think I have to concatenate the two keys but do not know how, I tried something like this:

$ Value = "<a href =productos_list.php?mastertable=subcategories &masterkey1= &masterkey2 =" . $ Data ["Idsubcategoria"]. "> <img Src=".$value." border=0> </ a>";

It does not work, I will appreciate your help, it should be something really easy because the program I use it generates a link that leads me to what I want but no picture format but as text link, and I can not find the place where the programs places the code I want to copy and paste into the option that allows me to put my custom code.

I have included a copy of the subcategories list my system generates, maybe you can have a better understanding.

If you need more details I give it gladly.