Reputation: 7845
Here's my "where" part:
$fornecedor->where = "nome_fantasia REGEXP '^[0-9+#-]*$%'";
It does not work. How can I match it?
Upvotes: 1
Views: 29
Reputation: 42719
REGEXP
doesn't want %
at the end. Also, your pattern searches the entire string because it starts with ^
and ends with $
. Try this:
$fornecedor->where = "nome_fantasia REGEXP '^[0-9+#-]'";
This searches only for a single matching character at the beginning of the line, since you don't care about anything after that.
Upvotes: 2