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

  • Home
  • SEARCH
  • 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 8994919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:31:49+00:00 2026-06-15T23:31:49+00:00

my code have an error in update part, it shows for me this error:

  • 0

my code have an error in update part, it shows for me this error:
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 ‘( reqdate= ‘2012-12-17’,lat1= ‘26.18355762868919’,long1= ‘50.30387832641602’,lat’ at line 1

and this is my code about update:

if(mysql_fetch_array($query1))
{
$datex = strtotime(date('Y-m-d H:i:s'))+36000;
$time = date('H:i:s', $datex);
$date=date('Y-m-d', $datex);
$result=mysql_query("SELECT * FROM sensorusers  WHERE uid='$uid'");

mysql_query("UPDATE requests SET ( reqdate= '$date',lat1= '$lat1',long1= '$lng1',lat2= '$lat2',long2='$lng2',lat3='$lat3',long3='$lng3',lat4='$lat4',long4='$lng4',inout='$type',time='$time') WHERE  sid= '$drivers'") or die(mysql_error());

$Alpha  = @mysql_query($query2,$db); //Execute Query

}
  • 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-15T23:31:51+00:00Added an answer on June 15, 2026 at 11:31 pm

    just remove the parenthesis and surely it will execute, eg

    UPDATE requests 
    SET   reqdate = '$date',
          lat1    = '$lat1',
          long1   = '$lng1',
          lat2    ='$lat2', 
          long2   = '$lng2', 
          lat3    = '$lat3',
          long3   = '$lng3',
          lat4    = '$lat4',
          long4   = '$lng4',
          `inout` = '$type',    // << RESERVED KEYWORD
          time    = '$time' 
    WHERE  sid    = '$drivers'
    

    INOUT is a RESERVED KEYWORD. You should escape it using backtick.

    be warned that this code is vulnerable with SQL Injection, please read the article below to learn how to prevent from it,

    • How can I prevent SQL injection in PHP?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have code that generates this error: ** Message: pygobject_register_sinkfunc is deprecated (GstObject) Traceback
this is my code and have a error: $('#map_canvas').mouseover(function(e){ console.log(e.offset().left+' '+e.offset().top) }) thanks i
I get this error, while I'm testing the code below: You have an error
i have an error in this code NSString *str = @above string; //load above
I'm getting an error when I use the SharpZipLib. I have code that looks
Getting this weird LINQ error. title = System.Linq.Enumerable+WhereSelectEnumerableIterator`2[System.Xml.Linq.XElement,System.String Here is the code I have:
i'm making a program/game that will update automatically. i have the update part down,
I have some code in my error handler I need to test against a
I have no code behind and the above error keep prompting on INSERT. The
I have following code using hibernate to throw a custom exception on error and

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.