Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 28 Jun 2005, 22:18
VBCoder VBCoder is offline
 
Join Date: Jun 2005
Unit Testing & Transactions

I'd like to use transactions to add unit testing to my vB mods & code. That is, I'd like to tell vB "Start a transaction. Now, use the DM API to do things. Now roll that transaction back" So the tests haven't disturbed anything.

Is there anyway to do this? How? (PHP4/MySQL4, but could switch to PHP5 if necessary)
Reply With Quote
  #2  
Old 29 Jun 2005, 00:24
merk merk is offline
 
Join Date: Nov 2001
Real name: Tim
From memory, the transactional things are dealt with by mysql, not php.

But MyISAM doesnt support transactional queries.
Reply With Quote
  #3  
Old 29 Jun 2005, 07:13
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Have a look at the following URL's:
http://dev.mysql.com/books/mysqlpres...rial/ch10.html
http://dev.mysql.com/doc/mysql/en/an...rent-apis.html

Like Merk already say, you can not use this with MyISAM tables. For InnoDB it is basically:

Start transaction:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Then end the transaction with one of the following:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

or:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Marco van Herwaarden
Ex vBulletin.org Coordinator
Reply With Quote
  #4  
Old 30 Jun 2005, 03:40
VBCoder VBCoder is offline
 
Join Date: Jun 2005
Sorry for not being more clear. I know how to do transactions in SQL. My question is, could I somehow wrap vB's actions in transactions. Something like:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

or, even better:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Note: I'm working from memory, so my syntax isn't exact
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Forum Home Enhancements Adsense Link Unit in Navbar StarBuG vBulletin 3.6 Template Modifications 30 04 Jul 2008 07:38
Mini Mods adsense unit on 2nd post and 1st profile on every thread page Mr.samy vBulletin 3.6 Template Modifications 1 06 Apr 2008 11:53
Mini Mods ... BigJimTheLug Modification Graveyard 1 07 Jun 2007 21:32



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 18:08.

Layout Options | Width: Wide Color: