Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8718855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:39:04+00:00 2026-06-13T06:39:04+00:00

Is it possible to edit and save data as coded below simultaneously to two

  • 0

Is it possible to edit and save data as coded below simultaneously to two different tables? Just look at the code which enters data to the data tables.

        if($opt>=$rec['gwstart'] && $opt<=$rec['gwend'])
        {


        $con=mysql_connect('localhost','root') or die ("Server connection failure!"); 
        $db=mysql_select_db('regional_data',$con) or die ("Couldn't connect the  database"); 
        $SQL22="UPDATE newchk SET totgw=$AAA where gwstart=$BBB"; 
        $run22=mysql_query($SQL22,$con) or die ("SQL Error"); 

        $SQL33="INSERT INTO invoentry (user_inv,dist_inv,chkNum,InvoNum,InvoVal,InvoDate,DueDate,type,condition) VALUES ('$naMex','$distUsr','$listVal','$InNo','$InValu','$date1','$date2','$typ','$cnd')"; 
        $run33 = mysql_query($SQL33,$con) or die ("SQL Error!..");
        $MSG ="Successfully saved your entry! ".$AAA." cheques are remaining.";
        }    
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T06:39:06+00:00Added an answer on June 13, 2026 at 6:39 am

    Yes you can, if your queries are somehow related and you need to make sure they both succeed you can use SQL TRANSACTIONS. otherwise, as you already did, you can run multiple queries.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any possible way to edit this code <asp:LoginName ID=LoginName1 runat=server style=top: 165px;
Is it possible to update existing data and save new data at the same
Is it possible to edit a JSON file using javaScript? I'm trying to read
Is it possible to edit and update a GridView cell without using <asp:TemplateField> and/or
Is it possible to edit computed-column values? I have a computed-col in my table,
Is it possible to edit web.config file of my cloud app deployed on Windows
(Edit: put possible solution at end) I'm a C/C++ programmer who is learning Objective
Is it possible to modify/edit, already installed firefox addons? Where are the addons stored
Possible Duplicate: Plugging in to Java compilers Edit - this appears to be a
Possible Duplicate: Saving changes after table edit in SQL Server Management Studio I need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.