i've a sql database with thousands of URLs. And i constantly update it without any modification in the Url using php5.
now, i'd like the add only the url which are not present in the database, i do this by check the database using this sql query
$q = $urlToCheck;
SELECT * FROM pligg WHERE rawUrl LIKE '$q%'
Here is the problem, some of the Urls which are already in the database are like
http://example.com/a_b_c.html
http://example.com/a1b1c.html
if i run the query
$q = 'http://example.com/a_b';
SELECT * FROM pligg WHERE rawUrl LIKE '$q%'
then it will return both the Urls. I want to return only the exact match Url. So, i want to get only this url
http://example.com/a_b_c.html
any help?