Ok, I have been on this for 1 hour now.. I am missing something very simple ? I need a new set of eyes on this ? I searched here and found a few things and tried to implement , but still came up short .
I have magic quotes turned off:
My search is for Sam's Club
In the database it is entered as : Sam's Club as well
Simple search function:
$q = htmlspecialchars($q);
// changes characters used in html to their equivalents, for example: < to >
$q = mysql_real_escape_string($q);
// makes sure nobody uses SQL injection
$raw_results = mysql_query("SELECT * FROM this, this2 WHERE this.TypeID = this2.TypeID AND this.status = 'Active' AND this.endDate >= CURDATE()
AND (`Title` LIKE '%".$q."%')") or die(mysql_error());
Still coming up empty result?
Obviously if I search for Sam it will query a result?
Here are two images from my phpMyAdmin:
SOLVED
I found the problem. I was including another list of functions in my header that I forgot about. That was messing with the variable.
Thanks for the troubleshooting! I still learned a ton!!