Hi dear<br><br><br>am having the more then 1000 records,<br><br>I want to insert the <--break-->,in that 1000 record ,<br><br>in that there is field called body, which contain article, too big content in that ,<br>now i want to insert the <--break-->, after every 1075 character has meet,<br>
<br><br>also Never broke the html tag...that is dont put the <--break--><br><br>between <<--break-->table>..<br><br><br>for this i written the code <br><br><br><?php<br>mysql_connect("localhost","root","admin");<br>
mysql_select_db("sample") or die("could not select the database");<br>$sql = "select * from node_revisions";<br>$rs = mysql_query($sql);<br>if(mysql_num_rows($rs)>0)<br>{<br>while($obj=mysql_fetch_object($rs))<br>
{<br>$body_chunksplit = $obj->body;<br>$nid=$obj->nid;<br>$body_chunksplit=str_replace("'", "\'", $body_chunksplit);<br> $lrn = strlen($body_chunksplit);<br>$length=$lrn*2;<br><br>if(strlen($body_chunksplit) >= 4500)<br>
{<br>$body_content=substr(chunk_split($body_chunksplit, 4500, "<--pagebreak-->"), 0, $length);<br>//drupal_set_message(wordcount($body_content));<br>}<br>else<br>{<br>$body_content=$body_chunksplit;<br>}<br>
mysql_query("UPDATE node_revisions SET body='$body_content' where nid='$nid'") or die("could not");<br>}<br><br><br>}<br><br>?><br><br>This is will not solved my total problem,<br><br>
Can any find the bug and solve it...<br>