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 6204629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:07:48+00:00 2026-05-24T05:07:48+00:00

this the condition: there is a form in html and php haivng around 120

  • 0

this the condition: there is a form in html and php haivng around 120 fields its for a website i am making this form on submitting goes to a php page where i first retrive all the values using $_REQUEST[]and then using insert query insert all of them in their specific coloums in the same table in my mysql database. Now i will have to do all the process again for updating these values. Becuase syntax for insert query and update query are quite different .

I dont want to write another 100 lines of code . Is there any way to use the code i wrote inside my insert query to use to update the data.?

  • 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-05-24T05:07:49+00:00Added an answer on May 24, 2026 at 5:07 am

    Another alternative, and depending on requirements and keys, you could use:

    replace into tbl (<cols>) values (<vals>)
    

    which will insert if not exist, or replace based on keys (insert/update in one query)

    or if you are only inserting and don’t want to insert twice, you could use:

    insert ignore into tbl (<cols>) values (<vals>)
    

    where if the record is already inserted based on keys, it is gracefully ignored

    for more info http://dev.mysql.com/doc/refman/5.0/en/replace.html

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

Sidebar

Related Questions

if (form.a.value !=&&form.b.value!= &&form.c.value !=) is there a shorter way for this condition?
Is there a way to get single regex to satisfy this condition?? I am
Is there a way to create a condition like this? @products = Product.find(:all, :limit
In Java is there a way to check the condition: Does this single character
Is there any advantage to writing a PHP conditional like this: if ($variable !=
I've got this HTML form where I have multiple input elements: text, radio, and
I have a snippet of HTML that is part of a form where there
Using ajax+php in my signup form. There are 2 validations: JS side frontend and
I know there are more elegant ways to set up an html form to
class BaseForm(forms.Form): def as_custom_table(self): Returns this form rendered as HTML <tr>s -- excluding the

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.