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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:17:50+00:00 2026-05-23T07:17:50+00:00

I feel so stupid, but I can’t find the error… Thanks. $l_sSql = ‘INSERT

  • 0

I feel so stupid, but I can’t find the error…
Thanks.

$l_sSql = 'INSERT INTO ftb2010_winners ("first_name", "last_name", "email", "dob", "token", claimed_status) VALUES (\''.$l_aData['firstName'].'\',\''.$l_aData["lastName"].'\',\''.$l_aData["email"].'\',\''.$l_aData["year"].'-'.$l_aData["month"].'-'.$l_aData["day"].'\', "token", 0;';

Here is the error when I run it

#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 ‘”first_name”, “last_name”,
“email”, “dob”, “token”,
claimed_status) VALUES (‘Phi’ at line
1

Edit… Ok, thanks… got it, yes I knew it was something stuipid that I was missing

  • 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-23T07:17:51+00:00Added an answer on May 23, 2026 at 7:17 am

    First error: field names should be enclosed in backticks, not quotes. (and even then, the backticks are only necessary if the field name is a reserved SQL word or contains special characters. Generally it’s a good idea to have backticks, but in your example you can get away without them)

    Second error: missing closing bracked on end of query.

    Possible error: Make sure all the variables you’re using are properly escaped. Failure to do so will result in your code being vulnerable to SQL injection attacks. (I can’t tell if this is actually a problem for you without seeing more of your code)

    Style issue: you’re mixing your quotes between single and double quotes without any good reason. ie some of your values are in single quotes, others are in double quotes. Be consistent. Also, all those escaped single quotes make the whole thing very hard to read!

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

Sidebar

Related Questions

I feel stupid for even asking this, but I can't find the file anywhere.
I feel stupid, but I can't get a TIMESTAMP column to be shown in
I feel so stupid for posting this but I can't see what's wrong here.
I'm sure this is a very stupid question but I can't find the answer,
I feel like I'm re-inventing the wheel here, but I need to find a
I feel stupid for asking this, but I've tried a couple things and I'm
I feel pretty stupid for asking this, but I'm doing a form where the
Greetings, I feel kinda stupid for asking this, but I want to set the
I feel like this is a stupid question because it seems like common sense
I feel like a fool, but here goes: public interface IHasErrorController{ ErrorController ErrorController {

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.