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!)
-- brion vibber (brion @ pobox.com)