I am trying to customize my Mediawiki Seach in $server['PHPSELF']. I would like to ask your help. I use mediawiki 1.18, wamp server, mysql.
I can index page list like this.
$query = "select page_title from page where page_namespace = 0";
But i don't know how to make a query for search..
Thanks in advance
Hi. Here is what you may use for search.
$search = $_REQUEST['search'];//just filter this data
$query = "select page_title from page where FIELD_NAME LIKE '%".$search."%' ";
Don't do that -- you really should sanitize the input as well as use parameterized queries. Only you can prevent SQL injections.
As for free-text search queries, if you want to be effective over a large amount of source data you typically don't use SQL or at least use a full text engine within SQL. No idea what mediawiki's internal structures look like so I can't give more specific advice.
This topic is now archived. It is frozen and cannot be changed in any way.