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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:58:54+00:00 2026-06-13T18:58:54+00:00

I have a feeling that my syntax is incorrect but I can’t narrow down

  • 0

I have a feeling that my syntax is incorrect but I can’t narrow down what’s going on. I have no issues running the statement in a phpMyAdmin SQL query, so hopefully I can get pointed in the right direction. My code is as follows:

else if ($resultdetails === 1) {
    $query3 = "update customer_det set `10k`='$_10k', 
      `14k`='$_14k', `18k`='$_18k', `21k`='$_21k', `22k`='$_22k', 
      `24k`='$_24k', `925k`='$_925k', `coins`='$coins', `bars`='$bars' 
      where `id` = '".$uid."'";
    $result3 = mysql_query($query3);
}

$resultdetails is a variable set with a EXISTS function. In the SQL query, it returns 1 for me, because the row I’m looking for does exist. So there should be no issues with that.

I tried the double ==, as well as the triple, and there doesn’t seem to be any difference in results. I believe the triple === means that it’s identical, i.e. the datatype is the same and the value is the same.

I think the issue here is the WHERE statement. Any ideas or suggestions would be greatly appreciated. I forgot to mention that customer_det is the table to be updated and id is the primary key, autoincremented. I pull the $uid variable from the database as well.

  • 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-13T18:58:55+00:00Added an answer on June 13, 2026 at 6:58 pm

    Your sql query is right !
    But your else if is the problem !
    see you add ===,
    change it with == and i’m also doubt with your variable declare,
    your code will look
    like this:

    else if ($resultdetails == 1) {
    $query3 = "update customer_det set `10k`='".$_10k."',
    `14k`='".$_14k."', `18k`='".$_18k."',
    `21k`='".$_21k."', `22k`='".$_22k."', `24k`='".$_24k."', `925k`='".$_925k."', `coins`='".$coins."', `bars`='".$bars."' where `id` = '".$uid."'";
    $result3 = mysql_query($query3);
    }
    

    EDIT:

     if (CONDITION :: IF FOUND ON DATABASE) {
      $query3 = "update customer_det set `10k`='".$_10k."',
     `14k`='".$_14k."', `18k`='".$_18k."',
     `21k`='".$_21k."', `22k`='".$_22k."', `24k`='".$_24k."', `925k`='".$_925k."',        `coins`='".$coins."', `bars`='".$bars."' where `id` = '".$uid."'";
     $result3 = mysql_query($query3);
     } else {
     // Insert query if not found
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a feeling that I'm missing something obvious but can't seem to resolve
I have a feeling that I am going to ask a stupid question, yet
I have a feeling I'm going about this all wrong. But anyway. I have
I have a feeling that this is stupid question, but I'll ask anyway... I
I have a feeling this may be related to C syntax, but I started
I have a feeling that my use of an interface is incorrect. I know
I have a feeling that this query is pretty easy to construct, I just
I somehow have the feeling that modern systems, including runtime libraries, this exception handler
Have a couple questions, using GSON. I have a feeling that GSON might not
This is an SDL problem, however I have the strong feeling that the problem

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.