Results 1 to 10 of 14

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Posts
    278
    Plugin Contributions
    0

    Default Re: SQL File Error - URGENT HELP NEEDED PLEASE

    Quote Originally Posted by Adds View Post
    What does this error mean:

    1109 Unknown table 'p' in field list
    in:
    [select count(p.products_id) as total ]


    I get this when ever I click on a product to view it's details? How can I fix this?
    I still have this issue when you click on a product to view it's details, I guess it's an error with the new database file that needs to be uploaded. How can I find out if there is an issue with my database? Is there away to resolve this?

    I have been back to the team who designed the site and they seem to think this could be the issue as well?

    Can a fix be made?

  2. #2
    Join Date
    Aug 2007
    Location
    Tampa FL.
    Posts
    142
    Plugin Contributions
    0

    Default Re: SQL File Error - URGENT HELP NEEDED PLEASE

    hello,

    was any files edited it sounds like you may have a problem in your /includes/modules/pages/product_info main_template_vars.php file.

    HTML Code:
    $sql = "select count(*) as total
              from " . TABLE_PRODUCTS . " p, " .
                       TABLE_PRODUCTS_DESCRIPTION . " pd
              where    p.products_status = '1'
              and      p.products_id = '" . (int)$_GET['products_id'] . "'
              and      pd.products_id = p.products_id
              and      pd.language_id = '" . (int)$_SESSION['languages_id'] . "'";
    If someone added tables to your database and added them in the file here there is a chance they called a table like this:
    HTML Code:
    $sql = "select p.products_id, pd.products_name,
                      pd.products_description,p,p.products_model,
    	  p.products_quantity, p.products_image,
    second line pd.products_description,'p,' p.products_model,
    the red would be wrong:

    Should look like this:
    HTML Code:
    $sql = "select p.products_id, pd.products_name,
                      pd.products_description,
    				  p.products_model,
    				  p.products_quantity, p.products_image,
                      pd.products_url, p.products_price,
                      p.products_tax_class_id, p.products_date_added,
                      p.products_date_available, p.manufacturers_id, p.products_quantity,
                      p.products_weight, p.products_priced_by_attribute, p.product_is_free,
                      p.products_qty_box_status,
                      p.products_quantity_order_max,
                      p.products_discount_type, 
    				  p.products_discount_type_from, 
    				  p.products_sort_order, 
    				  p.products_price_sorter,
    			//edited products  
    				  p.products_michel_cat_no,
    				  p.products_yvert_cat_no, 
    				  p.products_sg_cat_no, 
    				  p.products_scott_cat_no, 
    				  p.products_type_logo,
    				  p.products_type_logo2, 
    				  p.products_type_logo3,  
    				  p.products_item_no, 
    				  p.item_year, 
    				  p.item_fault,
    				  p.cancel_date_send, 
    				  p.products_type_logo2, 
    				  p.products_type_logo3, 
    			      p.cancel_country_send,
    				  p.cancel_town_send, 
    				  p.storage_loc,
    				  p.cancel_country_receive, 
    				  p.cancel_town_receive,
    				  p.item_type
    			//end edited products	   
    				   
                      
               from   " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
               where  p.products_status = '1'
               and    p.products_id = '" . (int)$_GET['products_id'] . "'
               and    pd.products_id = p.products_id
               and    pd.language_id = '" . (int)$_SESSION['languages_id'] . "'";
    Rich
    Last edited by poolprorich; 29 Oct 2007 at 06:11 AM.

 

 

Similar Threads

  1. Urgent Help needed please!
    By ShakaDula14 in forum General Questions
    Replies: 12
    Last Post: 5 Mar 2010, 09:11 PM
  2. Please urgent help needed
    By kasnah36 in forum General Questions
    Replies: 3
    Last Post: 15 Oct 2008, 08:37 AM
  3. Urgent help needed, please...
    By Nocturnal in forum General Questions
    Replies: 4
    Last Post: 23 Jan 2008, 10:05 PM
  4. urgent help needed please !
    By fantasticals in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 2 Jul 2007, 06:32 PM
  5. Urgent Urgent help needed please
    By con-fused in forum General Questions
    Replies: 1
    Last Post: 12 Feb 2007, 09:41 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