Right im very new to php and kinda learning as i go, here is my code.

What it is, is when i search a part number it has to be matching the case e.g if i search a6725 it doesnt work but if i search A6725 its returns the result.

please help!!!

$qresult = mysql_query("SELECT * FROM products WHERE part = \"$pt\"");
    $row = mysql_fetch_array($qresult);
		{
		do 
		{
			echo "<tr><td>".$row['part']."</td></tr>";
			echo "<tr><td>".$row['desc']."</td></tr>";
			echo "<tr><td>"; 
				if ($row['part'] <> $pt){
					echo $none;
					}
				elseif ($row['qt'] == $qty){
   					echo $limit;
					}		
				elseif ($row['qt'] >= $qty){
   					echo $in;
					}
				elseif ($row['qt'] <= $qty){
   					echo $out;
					}
		}
		while($row = mysql_fetch_array($qresult));
		}	
		
	echo "</table>";
$query="SELECT * FROM products WHERE part  LIKE \"%$pt%\""

This will match any string in the column `part` where the substring/string contained in $pt is found

solved it thanks anyway used this in the form code

onBlur="this.value=this.value.toUpperCase()"

to force it to search in uppercase

ta

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.