i am trying to select distinct data from my database and then select other information based on that distinct data. The problem I am having is that when selecting * from table where data ='distinct data' it is removing some HTML code that is in those fields and failing to find matches.

My question is this. Is there a way to select the exact characters from that original column.

Here is my current code:

PHP Code:
$surv "select distinct(content) from tool_survey where company='company 1' and survey_title like '%Best P%'";
$survt mysql_query($surv$ltools) or die(mysql_error());
$totalRows_survt mysql_num_rows($survt);    

//echo $surv;

while($row_survt mysql_fetch_assoc($survt)){

"Results for <b>".$row_survt['survey_title']."</b><br /><br />";

$ques "select distinct(question) from tool_survey where company='company 1' and content = '".$row_survt['content']."'";
$qs mysql_query($ques$ltools) or die(mysql_error());
$totalRows_qs mysql_num_rows($qs);    

//echo $ques;

while($row_qs mysql_fetch_assoc($qs)){
$row_qs['question']."<hr />";

In this example the value for content is what is not matching up because of HTML code inserted in the data. It seems to be ignoring the code. In a nut shell, is there a way to do something like this?

PHP Code:
echo exact_characters($results);