Board index   FAQ   Search  
Register  Login
Board index php forum :: Database phpMyAdmin

Making my first tabel - hlp

How to use phpmyadmin.... phpmyadmin related arguments. Even phpMyAdmin issues

Moderators: macek, egami, gesf

Making my first tabel - hlp

Postby Templar » Sat Sep 17, 2005 4:46 am

Hi. I am making my first tabel in my life and need some help. The lines are supposed to look like this:

Code: Select all
CREATE TABLE phpbb_themes_demo_info (
  themes_id mediumint( 8 ) unsigned NOT NULL,
  style_author varchar( 50 ) NOT NULL default '',
  style_converter varchar( 50 ) NOT NULL default '',
  style_version varchar( 10 ) NOT NULL default '',
  style_date date NOT NULL default '0000-00-00',
  style_website varchar( 100 ) NOT NULL default '',
  style_cwebsite varchar( 100 ) NOT NULL default '',
  style_download varchar( 100 ) NOT NULL default '',
  style_views mediumint( 8 ) unsigned NOT NULL default '0',
  style_downloads mediumint( 8 ) unsigned NOT NULL default '0',
  style_details text NOT NULL default '',
  PRIMARY KEY  (themes_id)
) TYPE=MyISAM;

INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('demoname', 'Styles Demo v1.1.0 ME');
INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('pure_demo', '0');



This have I put into my phpmyadmin like this:
http://83.227.193.230/pic/mysql.gif

1. How do I get the '' chars inte the end of every line?

2. How do I put in "PRIMARY KEY (themes_id)" who is supposed to be in the end?

3. Why do I get the error "'style_details' can't have a default value"?

4. Have missed something more?

Big thanks in advance!
Templar
New php-forum User
New php-forum User
 
Posts: 4
Joined: Tue Aug 30, 2005 9:11 am

Postby Alexej Kubarev » Sat Sep 17, 2005 7:39 am

first of all: you have a syntax error there: TEXT field types do NOT have default values

You can select a primaty key check box in phpmyadmin :)
User avatar
Alexej Kubarev
Site Admin
Site Admin
 
Posts: 2223
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län

Postby Templar » Sat Sep 17, 2005 8:09 am

TACK! One step in the right direction. If you check the picture again at http://83.227.193.230/pic/mysql.gif

1. Is it fine to write as I have done in "default"? (default 'a'). It is supposed to be just default '' but I dosent manage to make it like that. Any ideas?

2. where do I add the code:

Code: Select all
INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('demoname', 'Styles Demo v1.1.0 ME');
INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('pure_demo', '0');


?
Templar
New php-forum User
New php-forum User
 
Posts: 4
Joined: Tue Aug 30, 2005 9:11 am

Postby Alexej Kubarev » Sat Sep 17, 2005 2:18 pm

you will need to go to the SQL browser to copy-paste it... or you may go to the insert screen and enter data manually :)
User avatar
Alexej Kubarev
Site Admin
Site Admin
 
Posts: 2223
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län

Postby Templar » Sat Sep 17, 2005 3:28 pm

Tackar o bugar återigen :D (thx)
Templar
New php-forum User
New php-forum User
 
Posts: 4
Joined: Tue Aug 30, 2005 9:11 am

Postby Alexej Kubarev » Sun Sep 18, 2005 12:49 am

Hehe :) du är alltid välkommen med dina frågor :)
User avatar
Alexej Kubarev
Site Admin
Site Admin
 
Posts: 2223
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län


Return to phpMyAdmin

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.