On 28/11/05, Amruta Lonkar gtg808u@mail.gatech.edu wrote:
1)If i am adding references in a separate table how do i update this table when the user opens the same page again and deletes some reference from it. I want to be able to check a page for references every single time the user opens a page and saves it after changes. In that case should i always delete entries from the referencelinks table if soem references have been deleted or is there some other way to go about with it?
I'm not really sure what the question is here - if you want to have a referencelinks table up-to-date every time someone saves a page, then you need to update it every time someone saves the page. What actual SQL you use is up to you but basically you want to replace whatever is in the database from *before* they editted with what "should" be in the database *after* they've editted. The simplest way would seem to be to remove *all* the referencelinks for the editted page, and then "start fresh" as it were, adding the ones that should still (or newly) be there; but I'm no database guru, so that may be a dumb approach.
2)I have created a global variable $wgReferenceIDs[] as suggeested but i wanted to know if the variables contents will get overwritten if the user moves from one page to another. Does opening a new page start a new session?
Yes. The web is "stateless" - each request is completely independent. That's what the database is for ;)
-- Rowan Collins BSc [IMSoP]