Skip navigation links

MySQL Forums :: PHP :: Cannot update more than 255 characters into WP post_content field.


Advanced Search

Cannot update more than 255 characters into WP post_content field.
Posted by: Tom Chambers ()
Date: October 06, 2013 03:50PM

I am trying to update the post_content on a mysql blog and of course that normally will allow a huge amount of characters... but for some reason I am not being allowed to do the update via php unless the text length of the update is under 255 characters.. if I exceed the 255 it says failed.. under 255 works fine..
Now of course this field is a longtext field and normally holds huge amounts of characters..
The code I am using looks like this:
$id = 877;
$mydat = must be 255 or less...
include("connect-vicky-info.php");
$sql="UPDATE wp_posts SET post_content='$mydat' WHERE ID='$id'";
$result=mysql_query($sql);
if($result){
echo "<br><b>Successful!</b><br><br>";
} else {
echo "<br><font color=red><b>Negative Result.<b></font><br><br>";
}

Options: ReplyQuote


Subject Written By Posted
Cannot update more than 255 characters into WP post_content field. Tom Chambers 10/06/2013 03:50PM
Re: Cannot update more than 255 characters into WP post_content field. Peter Brawley 10/06/2013 09:49PM
Re: Cannot update more than 255 characters into WP post_content field. Rick James 10/06/2013 11:00PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.