 |
 |
CocoaMySQL: How to modify table?
|
 |
|
 |
|
Mac Enthusiast
Join Date: Oct 2001
Location: Chicago, IL
Status:
Offline
|
|
Hey there,
I've been using CocoaMySQL to modify text in a database... and that's worked out great for me - awesome application. Anyway, I've got to modify the database with the following table (which was sent to me in a file called "featured_products.sql)":
-----
create table featured (
featured_id int(11) not null auto_increment,
products_id int(11) default '0' not null ,
featured_date_added datetime ,
featured_last_modified datetime ,
expires_date datetime ,
date_status_change datetime ,
status int(1) default '1' ,
PRIMARY KEY (featured_id)
);
INSERT INTO configuration_group (configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible) values ('39','Featured', 'Featured Products Display', '339', '1'
);
INSERT into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) values ('Display Featured Products', 'FEATURED_PRODUCTS_DISPLAY', 'true', 'Set to true or false in order to display featured.', '39', '1', now(), now()
);
INSERT into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) values ('Maximum Display of Featured', 'MAX_DISPLAY_FEATURED_PRODUCTS', '6', 'This is the maximum amount of items to display on the front page.', '39', '2', now(), now()
);
-----
Does anyone who uses CocoaMySQL know where I'm supposed to copy and paste this so that it makes it happen (once I'm in the correct database)?
Thanks a ton,
BD
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Jan 2001
Location: Saint-Jean-sur-Richelieu, Québec, Canada
Status:
Offline
|
|
Select one command, copy, paste in 'Custom Query', click 'Run Query' enjoy!
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Oct 2001
Location: Chicago, IL
Status:
Offline
|
|
Great,
So I'm assuming that I do this 4 times; once for each command, in the order which I displayed the commands above:
1) create table featured... (RUN QUERY)
2) INSERT INTO configuration_group... (RUN QUERY)
3) INSERT into configuration... (RUN QUERY)
4) INSERT into configuration... (RUN QUERY)
And for sure they don't all need to be run at the same time with one copy/paste that includes all 4? Thanks again,
BD
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Jan 2001
Location: Saint-Jean-sur-Richelieu, Québec, Canada
Status:
Offline
|
|
Originally posted by BoulderDash:
Great,
So I'm assuming that I do this 4 times; once for each command, in the order which I displayed the commands above:
1) create table featured... (RUN QUERY)
2) INSERT INTO configuration_group... (RUN QUERY)
3) INSERT into configuration... (RUN QUERY)
4) INSERT into configuration... (RUN QUERY)
And for sure they don't all need to be run at the same time with one copy/paste that includes all 4? Thanks again,
BD
You'll have a 'Invalid query' if you put them in line. Do one at a time and it will be fine 
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Oct 2001
Location: Chicago, IL
Status:
Offline
|
|
Awesome,
Thanks a ton... I'm going to give it a go later tonight.
See ya,
BD
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Jan 2001
Location: Saint-Jean-sur-Richelieu, Québec, Canada
Status:
Offline
|
|
Originally posted by BoulderDash:
Awesome,
Thanks a ton... I'm going to give it a go later tonight.
See ya,
BD
np! 
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Oct 2001
Location: Chicago, IL
Status:
Offline
|
|
Hey there,
Just thought I'd also post this from the developer:
-----
Hi,
The attached file is just a text file containing MySQL commands. You could copy and paste them in the Custom Query view, but it's easier to import the file using the menu-item "Import > CocoaMySQL dump...". It imports not just CocoaMySQL dumps, but every type of sql-file (files containing MySQL commands).
Best Regards,
Lorenz
-----
Now there's a couple of ways to tackle this. See ya,
BD
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|