SCH_001 Posted September 21, 2018 Share Posted September 21, 2018 Hi every one, seeking a phpadmin query to export a selected category to excel Need the following headers Need the following headers - Category, Model, Name_en, Quantity, Image, Price, Weight, Description_en, Tax Class, Manufacturer Many thanks Link to comment Share on other sites More sharing options...
SCH_001 Posted September 21, 2018 Author Share Posted September 21, 2018 I have got this far SELECT p.products_model, pd.products_name, p.products_quantity, products_image, p.products_price, products_weight, products_tax_class_id, manufacturers_id FROM products p, `products_description` pd WHERE p.products_id = pd.products_id AND pd.language_id = '1' But still need the Category preferably by name and Description Also need the Tax Class and Manufacturer as names not a number Link to comment Share on other sites More sharing options...
Jack_mcs Posted September 21, 2018 Share Posted September 21, 2018 If you just need the file, then look at the Easy Populate addon. Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
MrPhil Posted September 21, 2018 Share Posted September 21, 2018 phpMyAdmin can export selected tables and fields as CSV files. It would give you the field names as the column headings, and the data as-stored as the entries. If you want custom headings and reformatted data entries, you'll have to write your own PHP (for example) code to read the table(s) and output the CSV as the format you want. Is that where you're heading on this? If the phpMyAdmin CSV is close enough, it might be easier to cobble up a post-processor to change column headings and replace data entries with new data (e.g., expand numbers into text fields). Link to comment Share on other sites More sharing options...
SCH_001 Posted September 22, 2018 Author Share Posted September 22, 2018 Yes phpmyadmin is close enough, just need assistance on how to query the other tables to get the missing information that I have not got so far Link to comment Share on other sites More sharing options...
SCH_001 Posted September 22, 2018 Author Share Posted September 22, 2018 And also how to only query one catergory id Link to comment Share on other sites More sharing options...
SCH_001 Posted September 22, 2018 Author Share Posted September 22, 2018 Ok in case anyone else wants this. It will create a report giving c.categories_id, cd.categories_name, p.products_model, pd.products_name, p.products_quantity, products_image, p.products_price, products_weight, pd.products_description, tc.tax_class_title, m.manufacturers_name SELECT c.categories_id, cd.categories_name, p.products_model, pd.products_name, p.products_quantity, products_image, p.products_price, products_weight, pd.products_description, tc.tax_class_title, m.manufacturers_name FROM products p, products_description pd, products_to_categories p2c, categories c, categories_description cd, manufacturers m, tax_class tc WHERE p.products_id = pd.products_id AND p.products_id = p2c.products_id AND p2c.categories_id = c.categories_id AND p2c.categories_id = cd.categories_id AND p.manufacturers_id = m.manufacturers_id AND p.products_tax_class_id = tc.tax_class_id AND p2c.categories_id = 322 AND pd.language_id = '1' Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.