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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:05:45+00:00 2026-06-09T07:05:45+00:00

Kindly do have a look at below mentioned SQL: $sql =INSERT INTO demo_participant (name,

  • 0

Kindly do have a look at below mentioned SQL:

$sql ="INSERT INTO
    demo_participant
    (name, meeting_id_id, password, user_view__url, key, contact_no, email)
    VALUES
    ('$part_name', (SELECT id FROM demo_meeting WHERE meetingID = '$mtngid'),
    '$attendee_password', '$join_url', $getit_part['data'], '$pr_mobile',
    '$pr_email')";

My problem is the above statement is working fine without key and its associated value $getit_part['data']

But whenever I am trying to store key value I am getting the error i.e:

Parse error: syntax error, unexpected ” (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /opt/lampp/htdocs/UI/user/joinmeeting.php on line 86

And when I am storing the value of $getit_part['data'] in another variable like $key then I am getting:

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 ‘key,contact_no,email) VALUES(‘Rohitn’,(SELECT id FROM demo_meeting WHERE ‘ at line 1

I know I am doing some syntax error but unable to debug it.

  • 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-09T07:05:47+00:00Added an answer on June 9, 2026 at 7:05 am

    key is a reserved word in MySQL. escape it with backticks

    `key`
    

    and you can’t combine select and values. Try

    INSERT INTO demo_participant(name, 
                                 meeting_id_id, 
                                 password, 
                                 user_view__url, 
                                 `key`, 
                                 contact_no,
                                 email)
    SELECT '$part_name', 
           id, 
           '$attendee_password',
           '$join_url',
           '$getit_part['data']',
           '$pr_mobile',
           '$pr_email'
    FROM demo_meeting
    WHERE meetingID = '$mtngid'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Kindly have a look at below code i am using this to generate a
I have console application in c. I want to convert into window application, kindly
I have converted HTML to DOC format using PHP. kindly view the below screen
Below are the list of my codes. Please kindly take a look. Option 1
Here is my code. You have to kindly look does it suffer from 'same
Kindly i have a page and in the page i have two pie charts,
Kindly point out if i have missed something? I have a project with type
I have a script that somebody from SO kindly provided to solve an issue
Please kindly help me in the following, I have $sub = C:\views\sght\gzad\text\hksdk\akldls\hool.java = C:\views\sght\bdsk\text\hksdfg\sdjks\same.java
I am new to testing.I have to test some C# classes.Kindly let me know

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.