Jump to content

Simple select statement help


lukep11a

Recommended Posts

There is probably a very simple answer to this question so excuse me for sounding dim but its driving me mad, can anyone tell me how to convert the following code to select only the results exactly equal to $var rather than all values like $var:

 

$query = "SELECT * FROM directory WHERE merchant LIKE \"%$var%\"";
	$result = mysql_query($query);

	while($row = mysql_fetch_assoc($result))
	{

Link to comment
https://forums.phpfreaks.com/topic/226283-simple-select-statement-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.