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

  • Home
  • SEARCH
  • 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 7698919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:21:22+00:00 2026-05-31T22:21:22+00:00

While I am running this code it showing me a following error:- Column ‘virtuemart_product_id’

  • 0

While I am running this code it showing me a following error:-

Column ‘virtuemart_product_id’ in where clause is ambiguous
Can anyone tell me how to resolve it.
Thank you.

<?php
    mysql_connect('localhost','root','');
    mysql_select_db('joom');
    $get=$_GET['virtuemart_product_id'];
    $get1=$_GET['virtuemart_category_id'];
    $sql="SELECT 
            btn9c_virtuemart_products_en_gb.virtuemart_product_id,
            btn9c_virtuemart_products_en_gb.product_s_desc, 
            btn9c_virtuemart_products_en_gb.product_desc, 
            btn9c_virtuemart_products_en_gb.product_name, 
            btn9c_virtuemart_product_prices.product_price 
          FROM btn9c_virtuemart_products_en_gb 
          JOIN btn9c_virtuemart_product_prices ON
            btn9c_virtuemart_products_en_gb.virtuemart_product_id=btn9c_virtuemart_product_prices.virtuemart_product_id 
          WHERE virtuemart_product_id='$get' ";
    if($result=mysql_query($sql))
    {
        while($row=mysql_fetch_assoc($result))
        {
            echo $row['product_price'];
        }
    }
    else 
    {
        echo (mysql_error());
    }       
?>
  • 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-31T22:21:24+00:00Added an answer on May 31, 2026 at 10:21 pm

    Put table name (or alias) with column names in where clause which are common between tables you are joining.

    Try below:

    $sql="SELECT 
            btn9c_virtuemart_products_en_gb.virtuemart_product_id,
            btn9c_virtuemart_products_en_gb.product_s_desc, 
            btn9c_virtuemart_products_en_gb.product_desc, 
            btn9c_virtuemart_products_en_gb.product_name, 
            btn9c_virtuemart_product_prices.product_price 
          FROM btn9c_virtuemart_products_en_gb 
          JOIN btn9c_virtuemart_product_prices ON
            btn9c_virtuemart_products_en_gb.virtuemart_product_id=btn9c_virtuemart_product_prices.virtuemart_product_id 
          WHERE  btn9c_virtuemart_products_en_gb.virtuemart_product_id='$get' ";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While running this code it shows Stackoverflow error. What is it I am doing
I am getting this weird error while running cucumber test: ERROR Mongo::OperationFailure: Database command
While running the code I've included below I receive the error EntityCommandExecutionException was unhandled
this error showed up in C# code, while using a Stored proc on SQL
While running this code: NSData *archivedSavedData = [[NSData alloc] init]; archivedSavedData = [defaults objectForKey:@listOfAccessNumbers];
I'm learning C++ and I'm using Visual C++ Express and while running this #include
Been trying to get this up and running for a while now. Basically i
We're currently running an svnserve instance as NT service. While this works, it's needlessly
I'm getting this error message whiile running a Webservice I'm working on. it builds,
While running a batch file in Windows XP I have found randomly occurring error

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.