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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:26:43+00:00 2026-05-24T17:26:43+00:00

You have an error in your SQL syntax; check the manual that corresponds to

  • 0

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 ‘s website.

mysql_query("UPDATE Scholarships2 SET Requirements2 = '$requirements2'
    WHERE scholarshipID = '$sID'")
        or die("Insert Error1: ".mysql_error());

I read other Stackoverflow questions/answers on this subject but cannot find the reserved word I am using.

$sID is just an int while, $requirements2 is

$regex = '/<h4>Requirements<\/h4>([\n\n\n]|.)*?<\/table>/';
preg_match_all($regex,$data,$match);
$requirements2 = $match[0][0];
  • 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-24T17:26:44+00:00Added an answer on May 24, 2026 at 5:26 pm

    for the right syntax to use near ‘s website

    This means it’s complaining about the bit of your query that is 's website. “Where is that bit in your query?”, I hear you ask.

    Well, one of those variables in there contains something like Bob's website and the fact that you’re blindly injecting that into your query will give you something like:

    UPDATE Scholarships2 SET Requirements2 = 'Bob's website' ...
    

    This particular query will not go down well with the SQL parser 🙂

    Other possibilities that don’t immediately choke the parser will also not go down well with your customer base when little Bobby Tables steals or deletes your credit card database.

    See this link for a fuller explanation and strategies for avoidance. In your case, that’s probably going to involve mysql-real-escape-string.

    In other words, you’ll need something like:

    mysql_query(
        "UPDATE Scholarships2 SET Requirements2 = '" .
        mysql_real_escape_string($requirements2) .
        "' WHERE scholarshipID = '" .
        mysql_real_escape_string($sID) .
        "'"
    ) or die("Insert Error1: ".mysql_error());
    

    As an aside, if $sID is just an integer (and not subject to injection attacks), you could probably remove the quotes from around it. I don’t think it matters with MySQL (due to its “everything is a string” nature) but your query won’t be portable to other DBMS’.

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

Sidebar

Related Questions

You have an error in your SQL syntax; check the manual that corresponds to
Notice: You have an error in your SQL syntax; check the manual that corresponds
You have an error in your SQL syntax; check the manual that corresponds to
You have an error in your SQL syntax; check the manual that corresponds to
You have an error in your SQL syntax; check the manual that corresponds to
1064 - You have an error in your SQL syntax; check the manual that
The error is: You have an error in your SQL syntax; check the manual
Error Number: 1064 You have an error in your SQL syntax; check the manual
I get this error:- You have an error in your SQL syntax; check the
Im getting the error: You have an error in your SQL syntax; check 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.