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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:04:52+00:00 2026-05-28T05:04:52+00:00

I have a mysql query as follows : $sql = INSERT INTO tbl_stopage SET

  • 0

I have a mysql query as follows :

$sql = "
        INSERT INTO
            tbl_stopage
        SET
            bus_id = '$bid',
            stopage_name = '$info[stopage_name]',
            fare = '$info[fare]',
            from = 'Ghy'
    ";

But when I tried to execute the above query , it shows the following error :

DB 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 'from = 'Ghy'' at line 7
INSERT INTO tbl_stopage SET bus_id = '1', stopage_name = 'Dergaon', fare = '123', from = 'Ghy'
  • 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-28T05:04:53+00:00Added an answer on May 28, 2026 at 5:04 am

    in SQL FROM is a reserved word try using from with the proper mySQL escape characters which I believe is `.

    In addition, are all the “numeric” values actualy numbers in the database? if so you don’t need the tics (‘) around them.

    Overall if its not too late you may avoid future headaces simply by altering the table not to use keywords such as FROM, SELECT, WHERE, GROUP BY, ORDER BY etc.

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

Sidebar

Related Questions

I have a MySQL query as follows: SELECT KeywordText, SUM(Frequency) AS Frequency FROM Keyword,
I have a SQL query as follows SELECT * FROM epf_application WHERE application_id IN
I have a mysql problem, my query looks as follows but not complete SELECT
I need to have MySQL query like this one: UPDATE table_name SET 1 =
I have a MySQL query that I use to retrieve random rows from a
I have a MySQL query like this: SELECT *, SUM(...some SQL removed for brevety)
I have a while loop getting info from a MySQL db, outputting info via
I'm querying a MySQL linked server from SQL Server. I can query the linked
I have attributes for sphinx as follows. meeting_feedback_count = <<-SQL SELECT meetings.* FROM meetings
I have a troublesome MySQL query as follows: SELECT camera_id, ((avg(low_price) + avg(high_price)) /

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.