Alright, I'm kind of at a bit of an road-block here. I've got the following code in place to dynamically display products based on the manufacturer, and it works perfectly fine except for 2 entries that end with an all rights reserved symbol. Obviously I think that has something to do with it, but anyway, here is the code and an explanation of what I've tried.
PHP: 5.2.6
MySQL: 5.0.45
//Check for manufacturer in URL
if($_GET['man'] != "")
{
echo '<div id="manlist">';
echo '<p>Select a product below that is produced by '.$_GET['man'].'.</p>';
$sql = "SELECT n.vid,
n.title,
ctsp.field_company_name_value,
nr.teaser
FROM node n
INNER JOIN content_type_skincare_product ctsp ON ctsp.vid = n.vid
INNER JOIN node_revisions nr ON nr.vid = ctsp.vid
WHERE ctsp.field_company_name_value LIKE '%".mysql_real_escape_string($_GET['man'])."%'
GROUP BY n.title
ORDER BY n.title";
$results = mysql_query($sql);
while($manproduct = mysql_fetch_array($results, MYSQL_ASSOC))
{
echo '<div id="uselandingpage">';
echo '<div id="uselandingpageproduct">';
$productname = fixoutput($manproduct['title']);
echo '<a href="skin-care.html?'.$menu.'vid='.$manproduct['vid'].'">'.$productname.'</a>';
echo '</div>';
echo '</div>';
}
echo '</div>';
}
Like I said, all variables return the proper results and list the products for the manufacturers except for Ti-Silc® and Z-Silc®.
If I add an echo $sql; line in, copy and paste the query into the SQL form in phpMyAdmin, it works fine and returns the proper rows, even with those two manufacturers... I'm kind of at a loss here, as I've never had a problem remotely like this. I've built quite a lot of queries and they generally either work or spit back an error for me to resolve.
I would assume that MySQL couldn't handle the ® symbols, but the copy and paste works fine... which points me to some issue with the actual PHP. Any help would be appreciated...