Forum Moderators: coopster
Error - Unknown column 'cat1' in 'where clause'
Any suggestions are to what I am doing wrong would be greatly appreciated.
[edited by: ergophobe at 4:22 pm (utc) on July 22, 2005]
[edit reason] code dump snipped - please see forum charter [/edit]
WHERE g.catid = d.catid AND p.id = g.id AND p.id = ".$r["id"]." AND $cat=0
The best I can come up with is you meant:
WHERE g.catid = d.catid AND p.id = g.id AND p.id = ".$r["id"]." AND something=$cat
More like the OR clause of the same connection. (Of course the obvious answer is because the query is looking for a column that does not exist...)
Justin
I removed the line containing $cat=0 which was a step forward as the results then only displayed the category I was looking for, but all the projects were still returned, whether they are linked to that category or not.
I need to link $result2 to $result 1 so that only the projects which are related to the category I am searching for are returned in the results.
Any ideas?