massive mysql table? 10000 characters
Moderator: General Moderators
massive mysql table? 10000 characters
hi, what sort of field will i use for something of this size (10000 characters)
i want it for a tutorial thingy im designing.
on my site i will have a form to add tutorials using mysql.
there will be 3 fields:
id (auto increment)
title (its title)
content (the text)
the content needs to be real big to hold all of the text that the tutorial will have in it, i was thinking around 10000 characters or maybe more.
i tried to use the BLOB but it didnt work, said i had errors in my syntax.
what sort of field can i use for this?
thanks.
i want it for a tutorial thingy im designing.
on my site i will have a form to add tutorials using mysql.
there will be 3 fields:
id (auto increment)
title (its title)
content (the text)
the content needs to be real big to hold all of the text that the tutorial will have in it, i was thinking around 10000 characters or maybe more.
i tried to use the BLOB but it didnt work, said i had errors in my syntax.
what sort of field can i use for this?
thanks.
Re: massive mysql table? 10000 characters
What errror exactly and what query did you execute when getting this error?.Stealth wrote:i tried to use the BLOB but it didnt work, said i had errors in my syntax.
hi, i used this:
Error
SQL-query :
CREATE TABLE `tutorials` (
`id` INT( 3 ) NOT NULL AUTO_INCREMENT ,
`title` VARCHAR( 35 ) NOT NULL ,
`content` TEXT( 10000 ) NOT NULL
)
MySQL said:
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(10000) NOT NULL)' at line 1
thanks
Error
SQL-query :
CREATE TABLE `tutorials` (
`id` INT( 3 ) NOT NULL AUTO_INCREMENT ,
`title` VARCHAR( 35 ) NOT NULL ,
`content` TEXT( 10000 ) NOT NULL
)
MySQL said:
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(10000) NOT NULL)' at line 1
thanks
i did it with php myadmin, i just used the form.
this one:
http://www.sketchfx.co.uk/imghost/uploa ... 5d0aab.jpg
this one:
http://www.sketchfx.co.uk/imghost/uploa ... 5d0aab.jpg
- WaldoMonster
- Forum Contributor
- Posts: 225
- Joined: Mon Apr 19, 2004 6:19 pm
- Contact:
- WaldoMonster
- Forum Contributor
- Posts: 225
- Joined: Mon Apr 19, 2004 6:19 pm
- Contact:
I was to late with the previous post.Stealth wrote:i did it with php myadmin, i just used the form.
this one:
http://www.sketchfx.co.uk/imghost/uploa ... 5d0aab.jpg
Mabe try out text without a number.
- WaldoMonster
- Forum Contributor
- Posts: 225
- Joined: Mon Apr 19, 2004 6:19 pm
- Contact:
There can only be one field with auto_increment in a table..Stealth wrote:oh ok thanks, seemed to solve that bit but i tried longtext and text without values and ive got this now lol:
MySQL said:
#1075 - Incorrect table definition; There can only be one auto column and it must be defined as a key
Or is it something else?
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA