By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,446 Members | 1,623 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,446 IT Pros & Developers. It's quick & easy.

mysql syntax error

P: n/a
red
I don't see why mysql is telling me the following is a syntax error:
create table articles
{ file char(30) not null
};
What is wrong with that ?

red
Jul 17 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
red wrote:
I don't see why mysql is telling me the following is a syntax error:
create table articles
{ file char(30) not null
};
What is wrong with that ?

red


Use parentheses (), not curlies {}

create table articles
( file char(30) not null
);

--
Chris Hope - The Electric Toolbox - http://www.electrictoolbox.com/
Jul 17 '05 #2

P: n/a
red wrote:
I don't see why mysql is telling me the following is a syntax error:
create table articles
{ file char(30) not null
};
What is wrong with that ?

red

Wrong braces. Use (), not {}

Steve
Jul 17 '05 #3

P: n/a
If you want an easy way to maintain your MySQL databases then try using
phpMyAdmin from http://www.phpmyadmin.net/

--
Tony Marston

http://www.tonymarston.net

"red" <gr*****@reenie.org> wrote in message
news:qS**********************@news.easynews.com...
I don't see why mysql is telling me the following is a syntax error:
create table articles
{ file char(30) not null
};
What is wrong with that ?

red

Jul 17 '05 #4

P: n/a
red
Tony Marston wrote:
If you want an easy way to maintain your MySQL databases then try using
phpMyAdmin from http://www.phpmyadmin.net/


Thanks everyone for the advice about the parentheses. I was reading from
a book, and I guess my eyes were fooling me.

I use phpmyadmin on my online server, but on my windows xp box, here's
how far I got with phpmyadmin:

http://www.zend.com/manual/faq.datab...ses.mysql.php5

"4. PHP 5 no longer bundles MySQL client libraries...
enable the extension php_mysql.dll inside php.ini"

I have the php_mysql.dll file in my php5 installation, and I know where
the php.ini file is. But I don't know what is meant by "enable the
extension" Can anyone please explain this ? Thanks.
Jul 17 '05 #5

P: n/a
red
red wrote:
Tony Marston wrote:
If you want an easy way to maintain your MySQL databases then try
using phpMyAdmin from http://www.phpmyadmin.net/


Thanks everyone for the advice about the parentheses. I was reading from
a book, and I guess my eyes were fooling me.

I use phpmyadmin on my online server, but on my windows xp box, here's
how far I got with phpmyadmin:

http://www.zend.com/manual/faq.datab...ses.mysql.php5

"4. PHP 5 no longer bundles MySQL client libraries...
enable the extension php_mysql.dll inside php.ini"

I have the php_mysql.dll file in my php5 installation, and I know where
the php.ini file is. But I don't know what is meant by "enable the
extension" Can anyone please explain this ? Thanks.


I finally figured it out.
in the php.ini file, remove the semicolon in front of
;extension=php_mysql.dll

It seems alot of people problems starting mysql in php5. I'll include my
experience in case it helps, although most people aren't as lost as I
am. Originally, I didn't figure this out because I was looking at the
php.ini in windows, which didn't have this line. Turns out my php.ini is
for php5 is in c:\php.

Also, I found http://www.faqts.com/knowledge_base/...html/aid/23162
helpful.

Jul 17 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.