Hi,
I hope someone can help me. I was following this tutorial and thought hey, this would be great for what I am trying to do. The problem is I guess I do not really understand the whole thing.
Here is the tutorial in case I don't explain everything so great.
But I got my first page to load great with this. I put in my table name in place of what they have in the tutorial. Then when you click on the link it is suppose to go deeper using another table which is called "classification" (classification is the child to category), then when you click on the category it is suppose to load up all the classified ads for that particular category.
As you can see this is a class that is called.
I tried just using the same thing I have always used when selecting only certain records with SQL such as:
$r = new RecNav($s, "SELECT * FROM classification WHERE parent_id=<| row0 |>", $bodyTemplate, $headerTemplate, "", 10);
and I tried (I put <| row0 |> into $pid):
$r = new RecNav($s, "SELECT * FROM classification WHERE parent_id LIKE '%$pid%'", $bodyTemplate, $headerTemplate, "", 10);
What am I doing wrong??? (The only thing I changed in the code is putting in the where statement.) I get html on my page and it looks like there is no records....but if I put the number of my parent_id that I want in it works fine. So, it has to be the the parameter I am putting in wrong.
Please can someone help me in this??? I am not that experienced in PHP and I need to get this up and running.
I will attach my files in case you need them as text files.
Thanks so much!!