Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SQL command for new fields without phpmyadmin


superfrank

Recommended Posts

For installing the New Fields contribution, I need to alter the products table in the database. The instructions say:

First using PhpMyAdmin click on the products table on the left. Add a new field called products_artist, set the type to varchar(45), Null to null and default to NULL.

 

But I do not have PhpMyAdmin, so I would need to do it through the MySQL commandline. I think the command should be something like:

ALTER TABLE products ADD COLUMN products_artist VARCHAR(45) DEFAULT NULL;

but I couldnt find anything about the Null to null, and mostly I suspect there are some syntax errors in my line above anyway.

 

Can anybody tell me what the SQL command should be *exactly*?

Link to comment
Share on other sites

Can anybody tell me what the SQL command should be *exactly*?

 

So it wasn't so bad after all... For anybody else who likes to know, the command should be:

ALTER TABLE products ADD COLUMN products_artist VARCHAR(45) NULL DEFAULT NULL;

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...