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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:59:23+00:00 2026-05-22T02:59:23+00:00

I am trying to update ‘pwd’ column of ‘Goal’ table using following mysql query

  • 0

I am trying to update ‘pwd’ column of ‘Goal’ table using following mysql query but sad thing is it gives error. mysql query:

UPDATE Goal 
   SET pwd = (SELECT MD5(CONCAT(ID, LEFT(phone,3), '$=')) 
                FROM Esubmission);

error:

1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘FROM Esubmission)’ at line 1

My tables are like below;

Esubmission
ID        | pnone       | email            |
--------------------------------------------
20378     | 00000000000 | someone@gmail.com|
20379     | 00000000000 | someone@gmail.com|
20380     | 00000000000 | someone@gmail.com|

Goal
usr   | pwd | time|
--------------------
20378 |     |12:09|
20379 |     |15:29|
20380 |     |15:47|
  • 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-22T02:59:24+00:00Added an answer on May 22, 2026 at 2:59 am

    Hmm…. I’m thinking that you really want to set the password for each user (I think), in which case you’ll need to have a join for the update, and that way you can eliminate your multiple values you are selecting.. because the way you have it, you’re updating all the values in the Goal table for pwd to the same value… the way below, you update each users pwd to be based on the row joined with the ID. Assuming you have one row for each usr in the esubmission table, this should work:

    
    UPDATE Goal    
    SET pwd = MD5(CONCAT(ID, LEFT(e.phone,3), '$='))                 
    FROM Goal g, Esubmission e
    where e.ID = g.usr
    
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

im trying to update my table using the following query... $query = mysql_query(UPDATE `outgoings`
i´m trying to update rows in mysql table , i´m using html form for
Trying to update a mysql employee table where the Group column if it contains
Im trying to update a table with the following code. If I change WHERE
Im trying to update a record in my table however im receiving the following
Trying to update a table on a linked server (SQL 2000/2005) but my server
I'm trying to update an old Access database using SQL scripts, but I can't
I am trying update my table from c# ado.net with this function.I am using
Trying to update a table view using: CREATE OR REPLACE VIEW [vtable] AS SELECT
I´m trying to update a db record using linq to sql First i query

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.