Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18
  1. #11
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Need help w/ SQL query in phpMyAdmin

    Apologies Audradh... I see that you are using phpMyAdmin... why not just use the EXPORT features there?

    ... or is the export you want more specific and custom?
    20 years a Zencart User

  2. #12
    Join Date
    Oct 2005
    Location
    Eastern US
    Posts
    488
    Plugin Contributions
    0

    Default Re: Need help w/ SQL query in phpMyAdmin

    Yes, I'm trying to pull only specific information for a data feed, so I don't think the Export tab will give me what I am looking for.

  3. #13
    Join Date
    Apr 2004
    Location
    vienna
    Posts
    198
    Plugin Contributions
    9

    Default Re: Need help w/ SQL query in phpMyAdmin

    Code:
    SELECT products_description.products_name, products_description.products_description, products_description.products_id, products.products_image, products.products_price_sorter
    FROM (products_description INNER JOIN products ON products_description.products_id = products.products_id) INNER JOIN specials ON products.products_id = specials.products_id
    WHERE products.products_status=1;
    in most cases Im lazzzy and use openoffice or msaccess to build the query graphicaly

  4. #14
    Join Date
    Oct 2005
    Location
    Eastern US
    Posts
    488
    Plugin Contributions
    0

    Default Re: Need help w/ SQL query in phpMyAdmin

    I am having a little trouble pulling sales products. Here is my code, similar to my specials code:
    Code:
    SELECT products_description.products_name, products_description.products_description, products_description.products_id, products.products_image, products.products_price_sorter
    FROM products_description
    INNER JOIN (
    products, salemaker_sales
    ) ON ( products_description.products_id = products.products_id
    AND products.master_categories_id = salemaker_sales.sale_categories_selected )
    WHERE products.products_status =1
    AND salemaker_sales.sale_status = "1"
    The problem I am seeing is that when a sale contains multiple categories, only the first category listed is being pulled by this query.

    Any thoughts?

  5. #15
    Join Date
    Feb 2008
    Posts
    1,336
    Plugin Contributions
    1

    Default Re: Need help w/ SQL query in phpMyAdmin

    Why not use Easy Populate, you can create a custom template that will extract which ever information you assign.

  6. #16
    Join Date
    Mar 2009
    Posts
    414
    Plugin Contributions
    0

    Default Re: Need help w/ SQL query in phpMyAdmin

    I was excited to see this thread, as I have been afraid to pose this question of how to extract files just certain files into a spreadsheet from MySQL using PHPMyAdmin, since it seems to relate to MySQL and PHPMyAdmin as much as to Zen Cart, so thank you for the information and for posing the questions.

    I would like to know how to use Easy Populate to extract data from my database. I will check the Easy Populate information, but cannot be sure to find it, as I have not seen such instructions yet; I will look for something relating to templates.

    Thanks again.
    notageek

  7. #17
    Join Date
    Mar 2009
    Posts
    414
    Plugin Contributions
    0

    Default Re: Need help w/ SQL query in phpMyAdmin

    I have been wondering what Glamorousshoe meant by using Easy Populate as a template.

    Right now, I contemplate moving columns in my vendor's file through PHPMyAdmin before uploading to Easy Populate, so they will be exported already in the Easy Populate template format.

    However, I saw in CSVed help that columns may be dragged and dropped, and the new column order set with a button. It said only the "listview" is changed permanently, but the file remains unsaved and as it was in its original format (assume SQL or CSV).

    I assume that means the file that remains unsaved is the SQL or CSV file, but when you pull it up to view it, you see the changed column order. (Hate to post before having verified this; if/when time allows, I intend to try out the process and examine the original and reopened files.)

    I am guessing from the above that Easy Populate is such a "listview" format, since it can download from the Zen Cart MySQL database which does not arrange the products in the order of the Easy Populate template.

    If this is so, this would explain how Easy Populate could act as a template which can extract files from MySQL without the original table having its order changed.

    But I still do not see any way to use this feature, if it is correctly figured, to extract an Easy Populate row from a database or CSV file not set up in the correct order. Is there such a possibility with Easy Populate? I.e., what was meant by "using Easy Populate as a template"?

  8. #18
    Join Date
    Oct 2005
    Location
    Eastern US
    Posts
    488
    Plugin Contributions
    0

    Default Re: Need help w/ SQL query in phpMyAdmin

    notageek,
    I have never taken the time to become intimate w/ Easy Populate. I do use EP "out of the box." As I understand it, columns of info can be added to an EP download, but I have not delved into that ability for lack of time. I would suggest checking the EP thread, which is quite active, and downloading the EP mod for the purpose of reading whatever instructions are included. Your question might be more likely answered if you pose it to the EP community specifically.
    Thinking on the one piece of data (sales prices) that I was unable to extract from phpMyAdmin, Glamorousshoe might be right. Because I do not need to distinguish sales from specials, simply pull out all discounted merchandise, I might be able to use EP, at the very least, to assist me in identifying those items. Whether I can make it work w/o still having to cut and paste I do not know w/o trying it.
    Website development time is at a bare minimum for me this time of year, so I am unlikely to look deeper into this before spring.
    But thanks to you Glamorousshoe for the thought, it just might solve my troubles. And thanks to you notageek for keeping this thread alive and my brain still working on the problem. I have solved my problem to a workable solution, but not workable enough that I am able to generate a spreadsheet at the touch of a button (or two.)

    Peace,
    Audra

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v151 Need some help building a looping SQL query to fill an array.
    By Chris Stackhouse in forum General Questions
    Replies: 2
    Last Post: 3 Sep 2015, 08:19 PM
  2. v139h Save the Multi Table Query Result in phpmyadmin or by SQL CLI
    By explorer1979 in forum General Questions
    Replies: 2
    Last Post: 31 Dec 2013, 09:03 PM
  3. Need help creating SQL query...
    By DigitalShadow in forum General Questions
    Replies: 2
    Last Post: 22 Jun 2011, 02:05 PM
  4. Need help with SQL query. Want to make membership that expires.
    By TecBrat in forum Managing Customers and Orders
    Replies: 1
    Last Post: 18 Jun 2010, 03:43 PM
  5. Specifying 'Product priced by attributes' by running phpmyadmin SQL query?
    By vandiermen in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 2 Aug 2009, 06:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg