[Mediawiki-l] Difference in SQL statements b/w 1.4.6 and 1.5

Ryan Hudy rthudy at hotmail.com
Fri Sep 30 18:05:50 UTC 2005


Thanks...

Just to make sure I'm on the same page, that would mean this statement using 
v 1.5:

select page_title, old_text from page, text, categorylinks, revision where 
page_id=cl_from and cl_to='$cat' and page_latest=rev_id and 
rev_text_id=old_id

would translate in v 1.4 to:

select cur_title, cur_text from cur, old, categorylinks where cur_id=cl_from 
and cl_to='$cat'

Correct?

Ryan

Ryan Hudy wrote:
  	  	I am running a wiki using version 1.5 and the below SQL statement
outputs the correct information. I am trying to develop the same
functionality with a wiki runiing 1.4.6.

First, please don't forget to upgrade that 1.4.6 wiki to 1.4.10. There
are security and data loss issues.

  	  	I know the database schema is
different among the two versions and I have seen the table name
comparision in the mediawiki site, but I'm still having troubles
determing what table names I need to change in the SQL statement to
achive the same result. What tables in version 1.4 will create the same
SQL statement result in version 5? Any help would be greatly appreciated!


"select old_text from text, page, revision where page_latest=rev_id and
rev_text_id=old_id and page_title='$pageTitle' and page_namespaced=$ns"

select cur_text from cur where cur_title='$pageTitle' and cur_namespace=$ns

(Make sure that your $pageTitle is properly escaped for SQL, in both cases!)





More information about the MediaWiki-l mailing list