[Mediawiki-l] Querying an external database.

Daniel Renfro bluecurio at gmail.com
Wed Sep 26 18:02:00 UTC 2007


     I am currently writing an extension similar to CategoryTree that will
display a JavaScript drop-down tree and populate its children on the fly
using ajax. The drop down tree is based on the Gene
Ontology<http://www.geneontology.org/>,
a set of hierarchal terms to describe biological processes, functions and
locations.  My questions are two:

     (1.) What is the correct syntax for querying an external (mysql)
database? I have looked into the Database.php and
DatabaseFunctions.phpfiles, but don't quite understand how to do this.
My mysql database can
easily be queried to give the children of a particular term, if I could only
select that database. I currently have a voodoo-like approach using
functions I wrote myself, but I'm sure there is a better way to do this.

    (2.) How do I correctly make an Ajax call? I have figured out how to
send my JavaScript along with the page, and I already have a
listener-function written, but I cannot figure out how to call a function in
a class on the server using ajax.

Daniel Renfro
Dept. of Biochemistry and Biophysics
2128 TAMU
Texas A&M Univ.
College Station, TX 77843-2128
979-458-3376


More information about the MediaWiki-l mailing list