Jump to content

Linking Tables Enquiry


e1seix

Recommended Posts

I have searched this subject on the forum which returned many results, but I'm finding it very difficult to relate this to my scenario. Can you help please?

 

I have 6 tables in my database: fragrances, skincare, shaving, bodycare, hairacre, suncare.

 

within these tables they all have the same columns: eg. Brand, ProdTitle, Price etc.

 

How do I link these tables together in order to produce a result whereby if the brand "LOVELY COMPANY" was 'searched' it will return results (Brand, ProdTitle, Price) under all 6 table categories where "LOVELY COMPANY" equals the brand?

 

Am I making this clear enough? It makes sense in my head. lol

 

Regards,

Link to comment
Share on other sites

I could do that yes, but I'm using a phpadmin tool online and I don't believe you can swap or merge tables together once they have been created. And I'm too far into uploading table entries to start over. I do see your point of view though. lol

Link to comment
Share on other sites

I think this will save you more time down the line. I'd do the following:

 

-export the data from the 6 tables into Excel

-add the type in the INSERT line codes in Excel (you can do it easily with formulas)

-create new table

-import SQL

-if all works, delete the 6 tables

 

Link to comment
Share on other sites

actually one more problem. it now comes up with an error:

 

Warning: mysql_query() [function.mysql-query]: Unable to save result set in /home/dogfight/public_html/untitled.php on line 74

MySQL client ran out of memory

 

How to solve?

Link to comment
Share on other sites

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.