无法匹配来自neo 4j graph db的loginemail

时间:2014-06-21 08:59:01

标签: php neo4j

我的查询是:

$email = $_POST['loginemail'];
$data1 = array(
"query" => "MATCH (a:userProfile { emailid: ".$email." }) RETURN a",
);

并且查询响应如下:

array(4) {

    ["message"]=>
     string(350) "Invalid input '@': expected an identifier character, node labels, a property
      map, a relationship pattern, '(', '.', '[', "=~", IN, IS, '*', '/', '%', '^', '+', '-', `'', "=", '=', "", "!=", AND, XOR, OR, ',' or '}' (line 1, column 38)
"MATCH (a:userProfile { emailid: test1@gmail.com }) RETURN a"`

然后如何匹配来自数据库的登录电子邮件

1 个答案:

答案 0 :(得分:0)

您需要将值(也就是电子邮件地址)放在引号中,或者更好,使用参数化密码,请参阅http://docs.neo4j.org/chunked/stable/cypher-parameters.html。要使用参数,您需要检查客户端驱动程序是否支持它们

相关问题