Unable to Search the database using Where clause with string field

I am using following code

public static function getRecord($query){ // Gets single record and returns single associative array
        $result = mysql_query($query) or die(mysql_error());
            $recordset = mysql_fetch_assoc($result);
                $recordset = false;
        return ($recordset);

$query = "SELECT * FROM callDetails WHERE storeName = " . $name ;  

I am getting this error

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'E Jewelers LIMIT 0, 50' at line 1

The $name is 'A E Jewelers'


$query = "SELECT * FROM callDetails WHERE storeName = '" . $name ."'";  

Need Your Help

Elasticsearch, multi_match, ruby on rails

ruby-on-rails elasticsearch

I'm would like to use ElasticSearch to search my collection of products.

PropertyAccessException in Apache camel Spring Ws Configuration

java spring apache-camel apache-httpclient-4.x spring-ws

I want to configure Spring-ws Connection Manager to use PoolingHttpClientConnectionManager. here is my configuration