MySql Max entry length
Moderator: General Moderators
MySql Max entry length
What is the maximum amount of data you can store in a single row? I have a site that requires large amounts of text to be stored per row? Is there any way I can achive this?
Let me make that a little clearer. I have the following page...
It will let me input small amounts of data and submit it, but long paragraphs simply disapear. Any ideas?
Code: Select all
<?php
if ($_POST['c'] != 1)
{
?>
<form name="form1" action="faq.php" method="POST">
<input type="hidden" name="c" value="1">
<input name="question" type="text" id="question" value="Enter question here" size="50">
<br>
<textarea name="answer" cols="50" rows="5" id="answer">Enter answer here</textarea>
<br>
<input type="submit" value="Search!">
</form>
<?php
} else if ($_POST['c']==1) {
include("connect.php");
include("dbselect.php");
$question = $_POST['question'];
$answer = $_POST['answer'];
$result = @mysql_query("INSERT INTO faq (question, answer) VALUES ('$question','$answer')");
echo 'FAQ Updated';
echo '<P> Click <a href="faq.php">here</a> to make another entry';
}
?>- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
If you are using VARCHAR fields, the maximum you will be able to store in them is 255 characters. For large amounts of data, a TEXT or BLOB field would be more appropriate:
http://www.mysql.com/doc/en/BLOB.html
Mac
http://www.mysql.com/doc/en/BLOB.html
Mac