In other words, a record is Men's Ministry. I convert it to use in a URL making it "mens-ministry" and it is requested by another page and then queried back to the same database table (where it is in its original form and must be converted in order to accurately be compared).
So here is my query:
Code: Select all
$query_PgDetails = "SELECT * FROM ec_Pages WHERE levelID=1 AND REPLACE(REPLACE(REPLACE(LCASE(pg_Title),' ','-'),'\'',''),'\"','')='".$ec_Page."'";Code: Select all
SELECT * FROM ec_Pages WHERE levelID=1 AND REPLACE(REPLACE(REPLACE(LCASE(pg_Title),' ','-'),'\'',''),'"','')='mens-ministry'