I have a customer who wants to manage my SEO title / description for any page in the website, so I The module can enter the URL / TITLE / DESCRIPTION and the website will check the entry of that page, and if there is, show it.
I have tried to: This does not clearly work, Because I believe that the complete text search works only with a different word, not the similarity between 1 word and the other, as the client can enter in the backend URL: And then the user of the website can access any Any clue about how to do this? Search with Your table engine was to be mesed or if you can use InnoDB with a full text index of MySQL-V 5.6+ $ url = 'http: //'.$_SERVER [' SERVER_NAME '] $ _ Server ['REQUEST_URI']; $ Q_seo = $ conexio-> Query (against "SELECT modulseo.titol, modulseo.descripcio, MATCH (modulseo.url))" (". $ Url.") As a module from the service, WHERE MATCH (modulseo.url) "' $ Url. '") By order DeSc serius 0,1';; if (mysql_num_rows ($ q_seo)) gt; 0) {$ d_seo = mysql_fetch_array ($ q_seo); $ headline = $ d_seo ['titol']; $ Descripcio = $ d_seo ['descripcio'];} and {$ titol = 'Default title'; $ Descripcio = 'Default description';}
http://domain.com/ Index.php
http://www.domain.com/index.php?language=fr
Http://domain.com/index.php?language=fr
LIKE% varible% This is a slow query but it will work.
mysql> Choose * from the exam; + ------ + ------ + ---------------------- + + | ID | Name | Last_name + ------ + ------ + ---------------------- + + | 0 | 0 | Http://domain.com/index.php | | 1 | 0 | Http://domain2.com/index.php | | 2 | 0 | Http://domain3.com/index.php | + ------ + ------ + ------------------------------ + 3 rows set In (0.00 seconds) mysql & gt; * Choose * from test where last_name like '% http: //domain.com/index.php%'; + ------ + ------ + ----------------------------- + | ID | Name | Last_name + ------ + ------ + ----------------------------- + | 0 | 0 | Http://domain.com/index.php | + ------ + ------ + ------------------------- 0.00% in + 1 set Seconds)
Comments
Post a Comment