Ok, I'm trying to figure out how to edit the mysql tables to add modules.

My server has phpMyAdmin and I'm trying to install some modules to my present drupal site (it's new - inmyshoes.net).

Installing the module to the site is no problem, it's dealing with the tables that I'm trying to learn.

So the instructions, for example, for the resipe module say:

2. Create the SQL table. This depends a little on your system, but the
most common method is:
mysql -u username -ppassword drupal < recipe.mysql

How do I actually do this? As I mentioned, I have access to phpMyAdmin, but I have limited experience with these and am trying to learn as I go. This is an experiment site.

Thanks in advance for anyone who can give input.

Khalil

Comments

mysize13shoes@www.inmyshoes.net’s picture

I tried to run an SQL query and got this:

"SQL query:

mysql - u username - ppassword drupal & lt;

recipe.mysql

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 'mysql -u username -ppassword drupal < recipe.mysql' at line 1"

gabriella’s picture

The file mentioned in the install.txt, ie recipe.mysql contains the sql command you need to create the new tables. Someting like

CREATE TABLE recipe (
   nid int(10) unsigned NOT NULL,
   source varchar(255),
   yield varchar(255),
   preptime int(10) DEFAULT '0',
   notes text,
   instructions text,
   PRIMARY KEY (nid)
);

CREATE TABLE recipe_ingredients (
   iid int unsigned NOT NULL PRIMARY KEY auto_increment,
   nid int(10) unsigned NOT NULL,
   ingredient varchar(255),
   weight tinyint DEFAULT '0'
);

In PhpMyAdmin choose the database you installed Drupal in.

Click on the tab "sql" and paste the command from the recipe.mysl file in the textarea on top of the page (run sql)