We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

EE Entries in PHP Queries

Development and Programming

webster10's avatar
webster10
9 posts
15 years ago
webster10's avatar webster10

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";
    }
?>
       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.