데이터베이스에 1000 자 이상을 저장하고 싶습니다. MySQL 데이터베이스를 사용합니다.값이 데이터베이스에 삽입되지 않았습니다.
50-100자를 삽입하면 코드가 성공적으로 실행됩니다. 하지만 1000자를 삽입하면 삽입되지 않습니다. 또한 오류를주지 않습니다.
phpMyAdmin에서 비슷한 삽입 쿼리를 사용하면 쿼리가 성공적으로 실행됩니다. 이 먼저 두 개의 필드가 VARCHAR & 마지막 필드가 LONGTEXT입니다있는 쿼리입니다 :
INSERT INTO news (headline,date,discription)
VALUES ("hi","date","A crumbling pitch and some resurgent Indian bowling have set up a gripping deciding Test with the series lead threatening to slip out of the hosts' grasp. India had snuck ahead at the end of the third day, but were dominant by lunch on the fourth as Pragyan Ojha and Amit Mishra ran through the Sri Lankan batting. Thilan Samaraweera, the centurion from the first innings, held firm and is key to Sri Lanka's fortunes as they try to build a lead that is competitive enough to give their spinners a chance. ")
이 실행 성공적으로 phpMyAdmin을
하지만 PHP에서 그것을 실행하려고하면, 다음은 실행할 수 없습니다에 .
mysql_real_escape_string($_POST['discription'])
이 수 :
$insert = "INSERT INTO news (headline,date,discription)
VALUES ('".$_POST['headline']."','".$_POST['date5']."','".$_POST['discription']."')";
$add_news = mysql_query($insert);
&이 코드는 태그를 사용하여 문자열 변수 전에
<textarea rows="2" cols="2" style="overflow: scroll; height: 90px; width: 635px;" name="discription"></textarea>
헤이 감사의 작업 는 Pratikg88 @ 당신 –
대단히 감사합니다 : 당신은 어떻게 든 오류를 잡기 있는지 나는 당신의 쿼리 (스리랑카) 단어를 보았 기 때문에 – Sarfraz
또한 만들 ... 환영합니다, 당신은하지 않았다 경우 그것이 확실히 오류를 줄 것이 탈출. – Centurion