Server Sync?
Posted by: garwil (---.saix.net)
Date: May 27, 2007 10:30AM

Is wampserver going to have a component that allows for db synchronising and / or table mapping?

I work with live inventory but my customers are mainly offline but still need to take orders so this is going to conflict with the live server. I need for my customers to sync their db with the live one in order to maintain correct inventory levels..

Great program though and I use it always...

Best regards,

Re: Server Sync?
Posted by: CyberSpatium (71.237.217.---)
Date: May 27, 2007 12:37PM

you need to check out transactions. that is technical jargon for a great feature (especially for your ecommerce site) feature of mysql.

from the mysql website:

A global transaction involves several actions that are transactional in themselves, but that all must either complete successfully as a group, or all be rolled back as a group. In essence, this extends ACID properties “up a level” so that multiple ACID transactions can be executed in concert as components of a global operation that also has ACID properties.

Some examples of distributed transactions:

* A bank keeps account information in an RDBMS and distributes and receives money via automated teller machines (ATMs). It is necessary to ensure that ATM actions are correctly reflected in the accounts, but this cannot be done with the RDBMS alone. A global transaction manager integrates the ATM and database resources to ensure overall consistency of financial transactions.

Applications that use global transactions involve one or more Resource Managers and a Transaction Manager:

* A Resource Manager (RM) provides access to transactional resources. A database server is one kind of resource manager. It must be possible to either commit or roll back transactions managed by the RM.

* A Transaction Manager (TM) coordinates the transactions that are part of a global transaction. It communicates with the RMs that handle each of these transactions. The individual transactions within a global transaction are “branches” of the global transaction. Global transactions and their branches are identified by a naming scheme described later.

The MySQL implementation of XA MySQL enables a MySQL server to act as a Resource Manager that handles XA transactions within a global transaction. A client program that connects to the MySQL server acts as the Transaction Manager.




notice i use bold font for the bank transaction example above. while you're not a bank, that is the best example to of transactions for your situation.

http://en.wikipedia.org/wiki/RDBMS

[dev.mysql.com]

[dev.mysql.com]

[en.wikipedia.org]

for even more power, if you are using php 5.x or greater check out the new mysqli functions. it provides an object oriented interface to connect to mysql way more powerfull then php's mysql functions and also ads some extra features like multiple queries, etc.

http://www.php.net/manual/en/ref.mysqli.php


CyberSpatium
----------------------
WAMP English Forum Admin

Need help? Check out my WAMP User Manual/Guide here!

Check out my new blog. It is for web developers, and especially tailored for the web development newbie. If you are not fluent in “geek speak”, then this incredible resource is just you. And even if you are a web development pro, this is a great resource to check out some of the latest web development tips, news, tutorials, codes and more.

Web Development for Newbie's Blog

Sorry, only registered users may post in this forum.