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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T01:52:42+00:00 2026-05-21T01:52:42+00:00

The following SQL query: INSERT INTO `database`.`table` (`param1`, `param2`) VALUES ( ‘Новости Томска –

  • 0

The following SQL query:

INSERT INTO `database`.`table` (`param1`, `param2`) 
VALUES (
'Новости Томска – подборка новостей из общественной жизни города, политики, спорта, обзор происшествий, событий.\r\nПолезная информация о недвижимости, авто, финансах, работе и консультации специалистов.\r\nОбъявления по различным тематикам, вакансии томских работодателей. \', 
'Томский городской портал, Томск, Портал города Томска, Недвижимость в Томске, Авторынок Томска, Продажа авто в Томске, Работа в Томске, Вакансии, Резюме, Отдых в Томске, Афиша Томска, Новости Томска, Томский форум, Погода в Томске, Томские сайты, Каталог томских сайтов, Частны');

failed with error message:

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 ‘Томский
городской портал, Томск, Портал гор’
at line 1

I have used mysql_real_escape_string on the strings before using them on the SQL query, so I thought this was enough to make them error-free.

My database is set to use

utf8_general_ci

as Collation for these fields.

What can be the problem with the 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-05-21T01:52:43+00:00Added an answer on May 21, 2026 at 1:52 am

    You are escaping the ' that should close the value of param1 (the first value in the values clause) :

    INSERT INTO `database`.`table` (`param1`, `param2`) 
    VALUES (
    '...й. \',   <= there
    '...ны');
    

    You should remove the \ before the closing ', so your query looks like this :

    INSERT INTO `database`.`table` (`param1`, `param2`) 
    VALUES (
    '...й. ', 
    '...ны');
    

    The \ is necessary to escape quotes inside the strings — and not quotes that are string delimiters.

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

Sidebar

Related Questions

I am getting the following error when try to save. SQL Query: INSERT INTO
I used an sql insert into a database table and I got the following
Hey I'm tring the following sql query : $sql = mysql_query(INSERT INTO feeds (FileLocation,Title,feeddate,nameofuploader,type)
Consider the following sql server query , DECLARE @Table TABLE( Wages FLOAT ) INSERT
In PHP, I create and execute SQL queries like the following. INSERT INTO Table
When trying to INSERT data into a database table, I've been getting the following
Ok, when trying to insert into the database I'm getting this error You have
I have the following SQL query: SELECT r.BEZEICHNUNG AS BEZEICHNUNG, r.ID AS ID, ra.BEZEICHNUNG
I currently have the following SQL query that lists all the names of all
I have the following SQL query SELECT r.BEZEICHNUNG AS BEZEICHNUNG, r.ID AS ID, ra.BEZEICHNUNG

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.