After many hours and many variations of code I am stuck!!.
So on the Category Page I want to get the minimum price from a table which stores the price. The following code is placed inside the loop. I have tried Sessions etc but no joy, where am I going wrong!!
- The SQL Statement works when the "Product X" is declared
- Doesn't work when trying to get the value from variable $test
<? /// LOWEST PRICE QUERY ?>
mysql_select_db($database_tickets, $tickets);
$test = "Product X";
$colname_lowestprice = "-1";
if (isset($_GET['$eventpricename'])) {
$colname_lowestprice = $eventpricename;
}
$query_lowestprice = sprintf("SELECT MIN(wp_events.price) AS lowestticketprice FROM wp_events, wp_merchants
WHERE eventname = 'Product X'");
//WHERE eventname = '".$test."'");
?>
Any help appreciated..