Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6191501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:46:40+00:00 2026-05-24T02:46:40+00:00

What I want to do is a PHP script that gets all the products

  • 0

What I want to do is a PHP script that gets all the products of a Joomla VirtueMart using PHP and mySQL. However my question has nothing to do about Joomla or PHP but I am in the need of a mySQL query.

Below you can find the tables and the fields that holds the data I need which are

product_id, product_desc, product_full_image, product_name, product_price, category_name.

To get the product_price you will need the product_id from jos_vm_product and match it with the product_id from jos_vm_product_price to get the product_price.

Every product_id has a category_id inside jos_vm_product_category_xref. So, when the category_id is found, you get the category_name from jos_vm_category.

This is difficult for me as I am not very familiar with SQL queries and I need your help on how to to join those tables, so it will allow me to echo the values I need.

Thank you.

jos_vm_poduct

product_id
product_desc
product_full_image
product_name

jos_vm_product_price

product_id
product_price

jos_vm_product_category_xref

product_id
category_id

jos_vm_category

category_id
categroy_name
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T02:46:40+00:00Added an answer on May 24, 2026 at 2:46 am

    Something like this ought to work:

    SELECT jvp.product_id, product_desc, product_full_image, product_name, product_price, category_name   
    FROM jos_vm_product jvp  
    JOIN jos_vm_product_price jvpp  
    ON jvp.product_id = jvpp.product_id  
    JOIN jos_vm_product_category_xref jvpcx  
    ON jvpcx.product_id = jvp.product_id  
    JOIN jos_vm_category jvc  
    ON jvc.category_id = jvpcx.category_id  
    

    Any questions about why, please ask away!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to write a php script that keeps the apache_log file open and
I want to setup a CRON that runs a PHP script that in turn
I have a php script that is running in CLI and I want to
I have a html_headers.inc.php script that I want to include in every script on
I want to execute a php-script from php that will use different constants and
I want to run a php script from the command line that is always
I want to make a button that starts my php script after I click
I have an multi-dimensional array that I want to send to a PHP script
I am running a PHP script that gets me the absolute paths of files
I made a script in PHP which gets a value using get method and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.