Jump to content

Recommended Posts

I am interested in knowing if there is a way for no a php mysql knowledge person to easily so to speak convert a pre exiting database so as to dump it into another pre existing database. I have a recipe script that is php and data base driven, ans well as another that has a data base already built with 42000 recipes. As you can see the goal is to merge the larger database into the one that has a few.

do you have phpmyadmin?

 

if so just dump the export the data and get the results of the dump from that and  then paste it into the sql option for the other table

 

I'm under the impression that the table layouts are different.  Also, if he has any auto_incrementing fields, he would have to tweak this.

 

 

 

 

 

@OP, you could just show us EXPLAIN <Tablename>; for each table if there aren't many of them.

This is the table that has 42000 recipe entries, the bottom is where I want to put these recipes!

 

 

This data base merged with the bottom database!

 

 

recipes

Field Type Null Default Comments

id  bigint(11) No     

Category  varchar(255) Yes  NULL   

Name  varchar(255) Yes  NULL   

Recipe  text Yes  NULL   

views  int(11) No  0   

comments  int(11) No  0   

addedby  varchar(25) No     

picture  varchar(255) No     

ratings  float No  0   

approved  int(11) Yes  NULL   

 

 

Indexes: Keyname Type Cardinality Field

PRIMARY  PRIMARY 981  id    <  ----------------------(This Is a small portion of the upload!Ihave this complete database on file all by itself)

Category  FULLTEXT 1  Category 

Name 

Recipe 

 

 

Space usage: Type Usage

Data 1,129  KiB

Index 967,680 B

Total 2,074  KiB

  Row Statistics: Statements Value

Format dynamic 

Rows 981 

Row length ø 1,178 

Row size  ø 2,165 B 

Next Autoindex 41,761 

Creation Oct 12, 2008 at 05:24 PM 

Last update Oct 25, 2008 at 12:42 AM 

Last check Oct 21, 2008 at 06:05 AM 

 

 

 

 

 

This is the tables I want to use, It goes with the script I am going to use

 

 

recipe_recipes

Field Type Null Default Comments

ID  int(10) No     

timestamp  int(12) No  1201666656   

submittedBy  int(10) No  1   

DishTitle  varchar(90) No     

Category  int(3) Yes  NULL   

Course  int(3) Yes  NULL   

Type  int(3) Yes  NULL   

Cuisine  int(3) Yes  NULL   

Season  int(3) Yes  NULL   

PrepMethod  int(3) Yes  NULL   

PrepTime  varchar(30) Yes  NULL   

Calories  int(4) Yes  NULL   

Serves  int(3) Yes  NULL   

DishImage  text Yes  NULL   

description  varchar(255) Yes  NULL   

IngredientDetails  text Yes  NULL   

PreparationDetails  text Yes  NULL   

ratingStr  text Yes  NULL   

rating  decimal(10,1) No  0.0   

hits  int(10) No  0   

approved  set('yes', 'no', 'pending') No  pending   

 

 

Indexes: Keyname Type Cardinality Field

PRIMARY  PRIMARY 7  ID 

 

 

Space usage: Type Usage

Data 7,488 B

Index 2,048 B

Total 9,536 B

  Row Statistics: Statements Value

Format dynamic 

Rows 7 

Row length ø 1,069 

Row size  ø 1,362 B 

Next Autoindex 8 

Creation Oct 20, 2008 at 08:18 AM 

Last update Oct 21, 2008 at 05:29 AM 

 

 

 

 

Again Thanks

 

 

 

 

 

 

 

 

 

 

 

 

 

So your saying that it should be as simple as just importing it, even though the recipe script it self is built for or around the original table. Please remember in my first post,I said I have (NO CLUE as to how or what to do.

 

 

I'm saying that it sounds like it would be easier to tweak your existing "script" to handle the new database table.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.