Sorry folks....it should be easy, but for me, well.....
i send varibles to a page, which in turn should complete a query.
For example i have test.php?Cata=Sedie&Cat4=case1. The 'Sedie' and 'case1' are created by the record.
In the query i have used
...and i get the error
$test1 = $_GET['Cata'];
$test2 = $_GET['Cat4'];
$query_product = "SELECT * FROM product WHERE cat1 = $test1 AND $test2 = 'y' ORDER BY id ASC";
$product = mysql_query($query_product, $funari) or die(mysql_error());
$row_product = mysql_fetch_assoc($product);
$totalRows_product = mysql_num_rows($product);
..but the column is 'cat1', not Sedie'
Unknown column 'Sedie' in 'where clause'
im very confused, thanks in advance
change this --
to this --
WHERE cat1 = $test1
WHERE cat1 = '$test1'
I tried every combination of single and double quotes...but not yours!