I have a SQL query where it looks into the database, pulls up the "poster" table and trimms it down by the 'category' column where in this case it's defined by the php's script of $_GET[show_cat']. So of course if 'show_cat' is = 1 you get only the results of that category. sorry trying to be as specific as possible It currently looks like this:
SELECT * FROM poster WHERE category=" .$_GET['show_cat'] ." ORDER BY code LIMIT $from, $max_results
The $from and $max_results are for creating pages so those aren't an issue
Now there is a another colum called 'category2'. I tried to also include it as:
SELECT * FROM poster WHERE category=" .$GET['show_cat']
."AND WHERE category=" .$GET['show_cat'] ." ORDER BY code LIMIT $from, $max_results
of course as expected I have gotten this error:
You have an error in your SQL syntax near 'WHERE category2=1 ORDER BY code LIMIT 0, 20' at line 1
There are addtional columns I wish to add but if I am unable to add just 1 addtional column made no sense in continuing on. How can I handle this? Thanks in advance..
PS
I included The FULL PHP Script as I last worked on it.