473,507 Members | 2,389 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

help with phpmyadmin

i tried to create a new table using phpmyadmin, but it gave me an error -
can anybody see what the problem is, and the correct code i could put into
the SQL section (kind of like the mysql command line, but in a php page).
TIA.

SQL-query :

CREATE TABLE `faq` (
`id` INT( 10 ) DEFAULT '0' NOT NULL AUTO_INCREMENT ,
`question` LONGBLOB( 1000 ) DEFAULT 'question' NOT NULL ,
`answer` LONGBLOB( 5000 ) DEFAULT 'answer' NOT NULL ,
PRIMARY KEY ( `id` ) ,
UNIQUE (
`question`
)
) COMMENT = 'table of frequently asked questions for FAQ page'

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
'(1000) DEFAULT 'question' NOT NULL, `answer` LONGBLOB(5000) DEF
Jul 17 '05 #1
2 3293
Matthew Robinson <ma*************@hotmail.com> wrote in message news:<pa***************************@hotmail.com>.. .
i tried to create a new table using phpmyadmin, but it gave me an error -
can anybody see what the problem is, and the correct code i could put into
the SQL section (kind of like the mysql command line, but in a php page).
TIA.

SQL-query :

CREATE TABLE `faq` (
`id` INT( 10 ) DEFAULT '0' NOT NULL AUTO_INCREMENT ,
`question` LONGBLOB( 1000 ) DEFAULT 'question' NOT NULL ,
`answer` LONGBLOB( 5000 ) DEFAULT 'answer' NOT NULL ,
PRIMARY KEY ( `id` ) ,
UNIQUE (
`question`
)
) COMMENT = 'table of frequently asked questions for FAQ page'

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
'(1000) DEFAULT 'question' NOT NULL, `answer` LONGBLOB(5000) DEF


MySQL bitfield data types don't take size
or allow default value specifications.
Like:
`question` LONGBLOB NOT NULL ,
`answer` LONGBLOB NOT NULL ,
Jul 17 '05 #2
From memory, don't put a length attribute on a LONGBLOB.

Peter.
"Matthew Robinson" <ma*************@hotmail.com> wrote in message
news:pa***************************@hotmail.com...
i tried to create a new table using phpmyadmin, but it gave me an error -
can anybody see what the problem is, and the correct code i could put into
the SQL section (kind of like the mysql command line, but in a php page).
TIA.

SQL-query :

CREATE TABLE `faq` (
`id` INT( 10 ) DEFAULT '0' NOT NULL AUTO_INCREMENT ,
`question` LONGBLOB( 1000 ) DEFAULT 'question' NOT NULL ,
`answer` LONGBLOB( 5000 ) DEFAULT 'answer' NOT NULL ,
PRIMARY KEY ( `id` ) ,
UNIQUE (
`question`
)
) COMMENT = 'table of frequently asked questions for FAQ page'

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
'(1000) DEFAULT 'question' NOT NULL, `answer` LONGBLOB(5000) DEF

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2033
by: Somerset Bob | last post by:
I've posted my query at the phpbb forum, where I got half an answer and then no more. I posted it again at another phpbb forum, where I got half an answer and no more. I posted it in alt.php, where...
0
1875
by: Somerset Bob | last post by:
I've posted my query at the phpbb forum, where I got half an answer and then no more. I posted it again at another phpbb forum, where I got half an answer and no more. I posted it in alt.php, where...
2
2936
by: Somerset Bob | last post by:
I've got pagination errors in a phpBB board. Some forums are showing "page 1 of 0". Previous enquiries both here and at the phpBB forum have given me half-answers, the latest of which contained...
0
3361
by: Ryan Schefke | last post by:
------=_NextPart_000_0077_01C34C8B.2B90C960 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit ..I just sent this out to the win32 distribution list but no one has...
0
1489
by: Gnarlodious | last post by:
This is some odd behavior, I'm hoping someone can explain. I have a TiBook running 4.0.17 and phpMyAdmin 2.5.5-pl1 where MySQL hostname is configured as "Gnarlodious-TiBook" (machinename). So...
3
2157
by: cofused | last post by:
Hi, I have set up the Xitami server (2.5c2) and PHP (5.0.5) on my Win98 system without any problem. I am trying to add PhpMyAdmin. When I try to load http://home/phpmyadmin which loads...
2
2704
by: dude | last post by:
I'm getting a message Directory Listing Denied, This Virtual Directory does not allow contents to be listed. I'm using WAMP5 and IIS, and the 'error' is displayed when i try to access...
0
1347
by: jjroger | last post by:
Hi I am trying to install phpmyadmin on server, I have password protected the directory. Try to enter the directory before even upload the phpmyadmin got the following massage. Fatal error:...
8
8860
by: Jonathan Sachs | last post by:
I just tried to install phpMyAdmin on my system, and I can't get it to work. When I tried to run the setup procedure (setup.php) I got the following message: Fatal error: session_start() :...
2
1896
by: seanh | last post by:
Hi all, I need some advice regarding phpmyadmin, I installed phpmyadmin directory in the htdocs but when I go to my http://mysite.com/phpmyadmin I get a 500 internal error. I checked the files...
0
7114
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7321
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7377
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7034
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5623
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1544
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.