2009/8/15 Kathleen Borja <jane88borj(a)yahoo.com>om>:
I've sent you an email (roan.kattouw(a)gmail.com). I
hope I've got the right email.
I was able to connect to the database using the wfGetDb statement. I now use the
$dbr object to access the fields and values in the database. I used the select()
method. I'm learning on how to use the especially the insert() method for it
will now use the write method. Can you give me an example of the insert()?
You'll need a write connection to be able to insert:
$dbw = wfGetDb( DB_MASTER ); // As opposed to DB_SLAVE, which is read-only
// Insert one row:
$dbw->insert( 'tablename', array( 'field1' => 'value1',
'field2' =>
'value2' ), __METHOD__ );
// Insert two rows and ignore errors such as duplicate indexes
$dbw->insert( 'tablename', array( array( 'field1' =>
'value1',
'field2' => 'value2' ), array( 'field1' => 'value3',
'field2' =>
'value4' ) ), __METHOD__, array( 'IGNORE' ) );
Documentation for insert() and other $dbr/$dbw methods is at
http://svn.wikimedia.org/doc/classDatabaseBase.html#e620764adec943ea9b52d05…
. You may also be interested in update() and replace().
Now, I made Special Page. But, when a link in a
special page is clicked, it must
redirect to another page. But what I did is I made another special page for it
to redirect to. Is there an easy way to make a page having the special page
template?
What do you mean redirect to another page? Do you just want a simple
link to another page, or do you want something more complex?
Roan Kattouw (Catrope)