What is wrong with my syntax that it is not place the $pn in the query, even though it is echoing it prior to the query.
{exp:weblog:entries weblog="guitars"}
<?php
$pn ='{skuproductName}';
?>
{/exp:weblog:entries}
<?php
include('/fmicprod/sku-datafeed-connect.php');
echo $pn;
$q = ("SELECT field_id_88 FROM exp_weblog_data WHERE field_id_101='$pn' ORDER BY field_id_88 ASC");
$r = mysqli_query ($dbc, $q) or trigger_error("Query: $q\n
MySQL Error: " . mysqli_error($dbc));
if (mysqli_num_rows($r)) { // MAIN IF
echo "<h2>Hello</h2";
}
?>Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.