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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T08:40:24+00:00 2026-05-11T08:40:24+00:00

Ok this is a new one for me. Basically I have a table articles:

  • 0

Ok this is a new one for me. Basically I have a table articles:

id: int auto increment title: varchar(200) description: varchar(1000) ctext: longtext chtml: longtext 

Now I do an insert into this table with mysql_query:

INSERT INTO articles (title, description, ctext, chtml) VALUES ('$title', '$description', '$text', '$html') 

All values have been passed through mysql_escape_string().

The text and html here are roughly 50k in size (so I can’t really post the fully query here).

Now, here’s the problem: the query works. A new row is inserted. However the ctext and chtml columns are empty. This is MySQL 5.0.51a and PHP 5.2.8. No errors are raised of any kind as far as I can tell.

Now I dumped the query out to a file in /tmp and ran it with:

mysql -u username -p dbname < /tmp/query 

Same thing.

I copy the query into Navicat and it… works.

So what on earth is going on?

  • 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. 2026-05-11T08:40:25+00:00Added an answer on May 11, 2026 at 8:40 am

    Some random thoughts:

    • Have you tried controlling the text length see if it only fails at one point?
    • What kind of connection are you opening? Which driver?
    • Have you checked the encoding of your connection? Some invalid characters might be sent in.
    • Have you tried using parameters instead of mysql_escape_string?
    • Have you tried executing directly from the same file from Navicat instead of using the copy-paste? Again, might be related to an invalid character that’s not passed through the copy-paste but was saved in the file.
    • Just to cover the basics we so often forget, how do you verify that the data is not inserted? I mean, how to you visualize it? You could have a line break that hides the first lines from 2 out of 3 means of visualization. Just a long shot, but I’ve seen it happen.

    Addition: MySQL connections defaults to latin1, you need to use something like mysql_query('SET NAMES 'utf8'') to transfer unicode characters.

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

Sidebar

Ask A Question

Stats

  • Questions 97k
  • Answers 97k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I believe that box's size is set by the environment… May 11, 2026 at 7:20 pm
  • Editorial Team
    Editorial Team added an answer By using XDeclaration. This will add the declaration. But with… May 11, 2026 at 7:20 pm
  • Editorial Team
    Editorial Team added an answer As I see on my pages, each iframe got independent… May 11, 2026 at 7:20 pm

Related Questions

I came across an interesting problem today. I have a text email I'm sending
Ok, I have a strange exception thrown from my code that's been bothering me
I've got a form that's a few pages long. To traverse the form all
I'm trying to use class names to change the color of a link after

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.