Your Friend Your Friend - 1 year ago 79
MySQL Question

using farword slash in sql where condition

Iam trying to search an element which starts with

below is the query i already tried...

Select id,url from myindex where url='[/]%' ;

Select id,url from myindex where url='/%';

but not worked.. any suggestion to fix this?

Answer Source

You don't want =. You want like. The second is the way to go in MySQL:

Select id, url
from myindex
where url like '/%';
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download