Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2010
    Posts
    263
    Plugin Contributions
    0

    red flag How do I run a MySQL Query ?

    How do I run a ZenCart PHP MySQL Query ? For example to produce a custom report to output every product which might fall under a certain catagory or have a certain field value and then display its name, price and product image in a web page ?

    i.e. I presume it could be done in PHP ocde.

    It would be appreciated if someone can show me how to do this or point me to a PHP coding example.

    Thanks,
    007

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: How to do a PHP ZenCart MySQL Query ?

    That isn't really a Zencart question, and is probably beyond the scope of this forum.

    If you search the Free Software Add Ons for 'report' there are some mods that may do what you want or offer some instruction as to how.

    There are also many excellent tutorials on PHP and MySQL on the Web.

  3. #3
    Join Date
    Sep 2010
    Posts
    263
    Plugin Contributions
    0

    red flag Re: How do I run a MySQL Query ?

    I'm looking for a ZenCart php MySQL query example, that does not require Admin access. The reports I've seen require admin access to run.

    Anyone got any examples that can run without having to be logged in as Admin ? Just something very basic, like list all product specials for example.
    Thanks,
    007

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: How do I run a MySQL Query ?

    Best choice is to use phpMyAdmin that should come with the Control Panel for your domain ...

    For seeing all the Product Special, browse the table in your database for:
    specials
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Sep 2010
    Posts
    263
    Plugin Contributions
    0

    red flag Re: How do I run a MySQL Query ?

    No I want an example of a ZenCart MySQL table query for PHP. Something that can run under any logged in account. I want to extract some table data and display it on a form.

    For example I want to select manufacturers_id from table products where the product_id = a given value. I then want to display the manufacturers_id value on screen.

    Can someone post some example code ?
    Thanks,
    007

  6. #6
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: How do I run a MySQL Query ?

    Lots of examples in /includes/functions/functions_lookups.php
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Sep 2010
    Posts
    263
    Plugin Contributions
    0

    red flag Re: How do I run a MySQL Query ?

    OK Thanks. I will take a look.
    Thanks,
    007

 

 

Similar Threads

  1. v151 How do I write up an SQL query to run from Admin Panel?
    By GumboStandards in forum General Questions
    Replies: 4
    Last Post: 28 Apr 2015, 03:44 PM
  2. v139h Do Zen Cart can run on MySQL using InnoDB?
    By explorer1979 in forum General Questions
    Replies: 3
    Last Post: 28 Feb 2014, 09:34 AM
  3. How do I test MySQL parse and query times?
    By Boomdawg in forum General Questions
    Replies: 1
    Last Post: 19 Mar 2010, 07:44 PM
  4. Can't get XAMPP Apache and Mysql to run
    By Decostyle in forum Installing on a Windows Server
    Replies: 22
    Last Post: 19 Dec 2008, 06:06 AM
  5. Trouble configuring home PC to run MySQL with PHP
    By brownrv in forum Basic Configuration
    Replies: 1
    Last Post: 28 Oct 2006, 08:36 PM

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