1有一個MySQL表類型「文本」的列「full_description」。 該列是一個標準的Lorem存有(加字結尾):PHP MySQL的選擇文本截斷
Lorem存有胡蘿蔔,番茄 回扣和給活力的精力和時間occaecat 肥胖。多年來所有 會我來了,我可以aliquip刺激措施,如果學區誰出她的 nostrud鍛鍊,配方的 優勢。 DUIS目前有cillum cupidatat 希望找疼痛足球的樂趣逃離 不產生合力的痛苦。他們不是excepteur excepteur cupidatat 百葉窗,還有 是舒緩的靈魂,即有過錯,他們拋棄了那些誰的一般職責,從你的煩惱。結束
然而,在PHP中做一個選擇它的時候,它只能檢索這麼多:
Lorem存有胡蘿蔔, 增強回扣,但他們 occaecat時間和活力,如勞動力和 肥胖。多年來所有 會我來了,我可以aliquip刺激措施,如果學區誰出她的 nostrud鍛鍊,配方的 優勢。家庭作業,如果cupidatat 疼我
下面是檢索它的PHP代碼,
function getPostingDetails($posting_id){
$getPosting = $this->PLAST->prepare('SELECT posting_id, poster_id, title, short_description, full_description FROM postings WHERE posting_id=?');
$getPosting->bind_param('i',$posting_id);
$getPosting->execute();
$getPosting->bind_result($row['posting_id'],$row['poster_id'],$row['title'],$row['short_description'],$row['full_description']);
$getPosting->fetch();
$getPosting->close();
return $row;
}
這是數組1 GET:
Array ([posting_id] => 1 [poster_id] => 1 [title] => Test 1 [short_description] => This is a short description. [full_description] => Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor i)
領域的其餘部分都很好。 1 我究竟做錯了什麼?或者是有限制的select語句1'm沒有意識到設置或功能?在MySQL?在PHP MySQL的?
感謝
這是根據請求表結構:
CREATE TABLE `postings` (
`posting_id` int(11) NOT NULL AUTO_INCREMENT,
`poster_id` int(11) NOT NULL,
`title` tinytext NOT NULL,
`short_description` tinytext NOT NULL,
`full_description` text NOT NULL,
PRIMARY KEY (`posting_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
你能後的表定義? SELECT返回的文本有256個字符。你沒有任何限制嗎?另一件事:你如何將數據插入數據庫? – 2009-10-02 21:39:15
我剛剛添加它。 我沒有看到,其中,極限將是...請注意,在phpMyAdmin中,full_description完全顯示。所以它被正確保存。在執行SELECT時截斷。 – 2009-10-02 21:41:54
你使用的是什麼框架?我認爲這是對TEXT數據類型的一些默認限制。 – 2009-10-02 21:48:59