How do i transfer funds from one account to another in the same table?

Say for example i want to transfer funds from UserID 1111101 to UserID  1111103.
Anyone know the procedure for this. I use php/mysql and dreamweaver.

Here's a very basic method. Note that this is just pseudocode - you'll need to work out the actual code (I assume you've learned how in your course studies). Keep in mind this is a very simplified workflow - a real bank transaction would be MUCH more complex.
Create a form that has fields for debit account, credit account, amount
In your script, assign the values from the form to local variables
$debit_acct
$credit_acct
$amount
I'll assume you have an account balance table 'acct_bal'. Have a journal table to store those values along with the date and autonumber transaction id.
Begin Trans
INSERT into journal (credit_acct, debit_acct, amount, trans_date) VALUES ($credit_acct, $debit_acct, $amount, NOW())
Get the transaction_id ($trans_id) from the INSERT statement- the method depends on which MySQL interface you are using.
UPDATE acct_bal SET balance = (balance + $amount) WHERE acct_id = $debit_acct
UPDATE acct_bal SET balance = (balance - $amount) WHERE acct_id = $credit_acct
Rollback on any SQL error else Commit Trans.

Similar Messages

  • How do i transfer music from one account to another on the same computer

    my wife and i share a computer but have two id's. I downloaded a music album from i tunes into my (id) account.  How do i get that album to my wife's music liberary?

    iTunes Home Sharing now works between users on same computer - https://discussions.apple.com/thread/3865597

  • HT5035 How do I transfer credit from one account to another?

    How do I transfer credit from one account to another.  I have 2 IDs because we have a lot of devices.  I want to transfer credit from one Apple ID to another Apple ID.

    You don't.
    (72323)

  • How do you transfer money from one account to another

    How do you transfer money from one account to another?

    Credit card.
    You cannot use your credit to buy credit/gifts form someone.

  • Is there a way of shifting purchases from one account to another with the same billing information, so that I don't lose purchases made by my iPhone when I sync?

    The AOL address I was using for my iTunes account has been deleted due to me not signing in for awhile and I'm afraid that I will lose all of my purchases made from my iphone when I sync it into iTunes for a much needed update and so that I can (hopefully) transfer its data to my new iPhone 4...
    The only time I have synced my current iPhone was when I activated it but since then I have not been able to sync with my computer and now have a new one.
    Sorry about the garbled way this is written but I desperately need help:
    1, Is there a way of shifting purchases from one account to another with the same billing information?
    Or
    2, is there a way of recovering my old account and changing the details?
    Any other help is greatly appreciated
    Thom

    You don't need to access your e-mail account, just get into your Apple account and change the e-mail address. If you can't access your Apple account, then you have a bigger issue to contend with.

  • Does anyone know how to transfer funds from one account to another?

    I Accidentally redeemed my itunes gift card to the wrong account. Does anyone know how I could transfer the funds?

    Gabby,
    It is not possible to transfer credit from one account to another.
    However, if you redeem a gift card and have not yet spent any of it, you can request to have the amount put back onto the card.  Contact iTunes Customer Service here:
    http://www.apple.com/support/itunes/contact/

  • How do i transfer music from one account to another?

    I want to transfer music from my account to my friends account, how do i do that?

    You can't transfer content from one account to another.

  • How can i transfer apps from one account to another.?

    now i had bought apps with my old account. but when i sync them into my phone i cant update them using my account, i need the old itunes i had. How can i transfer all bought apps onto my new account?

    You can't.
    All 3rd party apps - all paid and free apps include DRM protection which is tied to the iTunes account used to purchase/download the apps. DRM cannot be transferred from one account to another.
    Why did you get a new iTunes account? Changing your email address alone does not require doing so.

  • How to transfer user settings from one account to another (on the same Mac)

    I'd like to create separate user accounts for "work" and "play" (so that I can do things like have separate address books, etc...). However, I already have LOTS of personalized settings (trackpad behavior, login items, etc) that I'd like to keep the same between the two accounts.
    Is there a way to transfer all of the user settings from one account to another?

    You'll need to copy your /Home/Library folder. Make sure you back up first before doing the following. Log out of both your Work and Play accounts. Log in to a third account with administrator privileges. Assuming you are copying from the account called "work" to the account called "play", enter the following in Terminal:
    sudo rm -rf ~play/Library (this deletes Play's Library folder.)
    sudo cp -R ~work/Library ~play/Library (this copies Work's Library folder to Play's folder.)
    sudo chown -R play ~play/Library (this fixes permissions of Play's new Library folder.)

  • How to transfer files from one partition to another on the same computer

    I had a crash could not boot back into my 8.1 upgrade. Went out bought standalone 8.1. I loaded it on HD free space now I want to transfer files from one partition to another.

    hi
    say there are two infoobjects X  and Y.
    X is existing infoobject and Y in new one.
    go to infosurce-search for X-create export datasource - map the rules and load the data.
    This is one way.
    Other way is u can use X as a reference object of Y so that both of them have same structure and both objects will share common database tables in BW which are exsting for X.
    Hope this helps.
    Kindly assign the points if it helps.

  • How do I move songs from one library to another on the same computer? Also, how do I change the name of a library?

    I have created a separate Apple account, but want to use the same computer for multiple accounts. How do I do this? I also want to transfer songs from one account to the new one.

    is this second library in a different account on the computer?
    Look at Home Sharing.
    iTunes: How to share music and video - http://support.apple.com/kb/HT2688 - about Music Sharing and Home Sharing
    Home Sharing Support page - http://www.apple.com/support/homesharing/
    iTunes: Setting up Home Sharing on your computer - http://support.apple.com/kb/HT4620
    iTunes Home Sharing now works between users on same computer - https://discussions.apple.com/thread/3865597

  • ITunes user library transfer from one account to another on the SAME comptr

    Initial information: I have my computer, internet is with SBC Yahoo DSL. It has five sub accounts on it; mine, my wife's and my three children. Each has their own subaccount to make life easy.
    I bought my wife an ipod in the August and through ignorance set up the itune to run on my subaccount. So when she wanted to buy a song, she had to go to my subaccount, log on, buy the song, plug in and download to the ipod. No problem.
    I then bought my daughter an ipod for her birthday in September. Not knowing any better, she plugged into my subaccount and got all of her mother's stuff. Not a big problem in that they like the same stuff.
    December my son gets an ipod. I learned my lesson and set up an itunes account on his subaccount. He therefore buys songs, that go to his ipod only. He wanted some songs from mom's, so I couldn't figure how to get them over. So I read the instructions on this web page. I burned the disk with the 22 songs that he wanted, but when burning the discs, no info (song title, artist, album) came with it, so I manually added the song titles and artists names. He was satisfied.
    Now mom and sister want their songs put onto their subaccounts so that they won't have to share, or better, won't have to down load what each other has. I tried burning more discs, but when I got to disc #11, I realized that once again, there are no names or titles, etc to the songs on the burnt discs.
    QUESTION: (finally) Is there a way to transfer the songs from dad's itunes, to other subaccounts on the SAME computer. This way not needing to burn lots of CD's without the information that they want.
    Final piece of info, in case you don't know how SBC/Yahoo DSL is set up. I have the different subaccount on the computer, but to get from one to another, you need to either log off, or so simply "switch users." For this reason, such functions like "select all" then "copy" then "paste" I don't think can be done. Please make your answers very simple as I am not that computer literate.
    Thank you

    I'll try and keep this simple. It gets a bit confusing.
    Ok, in the account which you want to transfer songs from, make a playlist of all the songs you wish transferred. After you do so, open the playlist, then go to "File > Export Song List". Put the file in a place that you'll remember. Then, go to the account you want the songs to go to, then go to "File > Import", and find the file you created from the other account and open it. That should import those songs into that iTunes library.

  • Importing from one account to another on the same computer

    How do you import video from one windows XP account to another on itunes? My account is the primary and I can import from my wife's account into mine but she cannot import from mine to hers? How do I fix this?

    Does this help?
    How to share music between different accounts on a single computer.

  • How do I can link from one MXML to another in the same project?

    I planned to create a login page separated in my new Flex
    application. Maybe I am too attached to the WEB philosophy but I
    prefer to do it in that way. The login page will simply validate
    the login through a call to a CFC. While the CFC will also create
    the session variables I will need over the navigation of the user
    (once the login is validated), the variables (or more specifically
    the values of those variables) will serve as reference during the
    user's navigation. And those values are contains in the ColdFusion
    Session and can be accessed through CFCs.
    If the login is a success, I need to redirect the user to the
    appropriate page (in my case, the application is a help desk system
    so if the user is identified as a technician will go to the
    technician.mxml or if the user is identified as a sysadmin, will go
    to the sysadmin.mxml - simple as that). Now, I know it is possible
    to redirect using ExternalInterface.call function but is there
    anything more specific to Flex redirection from one MXML to
    another? Just like classes (where you can create dependency of a
    child classe to is parent)?
    Thank you

    I finally decided to use simply the method
    ExternalInterface.call to do this and it works fine! I passed
    parameters through the URL and I actually created CFM page that
    contains a copy of the HTML code generated by FlexBuilder (the CFM
    page give me the possibility to deal with the parameters).
    But I though that Flex can actually call another Flex and
    passing parameters directly without passing by the HTML page
    itself. A kind of memory scope but I guess I wish too much!!!
    ;-))

  • How can i transfer credits from one account to another that I own ?

    Due to some personal issues I created multiple apple id accounts. I accidently added itunes credit to the account not associated with an app that I want to make a purchase on. Is there anyway I can transfer those funds to the proper account ?

    Apple has never permitted any form of merging of Apple ID related accounts.  All apps, and purchases in one account are permanently tied to that account and cannot be transfered to another.
    You can try communicating with the store support staff and see if they can do something to help: http://www.apple.com/emea/support/ituens/contact.html

Maybe you are looking for