Results 1 to 8 of 8
  1. #1
    Join Date
    Aug 2004
    Location
    Saint Petersburg, Russia
    Posts
    1,786
    Plugin Contributions
    13

    Default [Done 1.3.9a] Admin order.php search products SQL Error 1054

    Admin order.php when search products receiving SQL Error:
    1054 Unknown column 'o.orders_id' in 'on clause'
    in:
    [select count(distinct o.orders_id) as total from (orders o, orders_status s left join orders_products op on (op.orders_id = o.orders_id) ) left join orders_total ot on (o.orders_id = ot.orders_id) where (o.orders_status = s.orders_status_id and s.language_id = '2' and ot.class = 'ot_total') and (op.products_model like '%ttt%' or op.products_name like 'ttt%')]

    MySQL 5.1.22-rc-log
    5.2.5 (Zend: 2.2.0)
    Zen Cart 1.3.8a
    v1.3.8 [2008-04-10 13:05:03] (Fresh Installation)
    Fresh installation - no any modules.

    Line 720-721, 732-733, 744-745
    Code:
                                TABLE_ORDERS_STATUS . " s " .
                                $new_table . ")
    replace by
    Code:
                                TABLE_ORDERS_STATUS . " s )" .
                                $new_table . "

  2. #2
    Join Date
    Nov 2007
    Posts
    162
    Plugin Contributions
    0

    Default Re: Admin order.php search products SQL Error 1054

    I am getting a similar error when I try to search orders by product:

    Here's the error message:
    Code:
    1054 Unknown column 'o.orders_id' in 'on clause'
    in:
    [select count(distinct o.orders_id) as total from (orders o, orders_status s left join orders_products op on (op.orders_id = o.orders_id) ) left join orders_total ot on (o.orders_id = ot.orders_id) where (o.orders_status = s.orders_status_id and s.language_id = '1' and ot.class = 'ot_total') and (op.products_model like '%RA181%' or op.products_name like 'RA181%')]
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
    I have no idea what this means...

    any help would be appreciated


    Zencart ROCKS
    www.ZenCrystals.com
    www.CraftMagick.com
    Magickal & Metaphysical supplies/services

  3. #3
    Join Date
    Nov 2003
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: Admin order.php search products SQL Error 1054

    It's exactly the same problem as Andrew describes! So just apply the fix he posted, it works perfectly

  4. #4
    Join Date
    Nov 2007
    Posts
    162
    Plugin Contributions
    0

    Default Re: Admin order.php search products SQL Error 1054

    Quote Originally Posted by paulm View Post
    It's exactly the same problem as Andrew describes! So just apply the fix he posted, it works perfectly
    Thank you for your patience, paulm.

    I hadn't realized his solution was something a mere mortal like me (read: non sql/php programmer) could do...

    After reading your post I figured it must be something rather straight forward so decided to give it a whirl...

    And for any other mere mortal newbies that may read this thread someday and here's the way I found the solution in the most basic of terms...

    1. Searched the Admin>Dev Tool Kit for $new_table and found the code in the admin/orders.php file

    2. CREATED A BACKUP (never forget this crucial step!) of the orders.php file

    3. modified the code changes as suggested above


    Viola! I can now search orders very easily

    So thank you for being so compassionate and helpful. I appreciate it very much.


    Zencart ROCKS
    www.ZenCrystals.com
    www.CraftMagick.com
    Magickal & Metaphysical supplies/services

  5. #5
    Join Date
    Oct 2007
    Location
    Kentucky - USA
    Posts
    428
    Plugin Contributions
    0

    Default Re: Admin order.php search products SQL Error 1054

    Interesting - However in my admin orders.php I have the following - at line 719, 731, & 743
    Code:
                                from (" . TABLE_ORDERS_STATUS . " s, " .
                                TABLE_ORDERS . " o " .
                                $new_table . ")
    This is a clean install with addons. I do not remember if there were any previous corrections to this php.

    Oh, I am not receiving any errors.

    Sawhorse
    Last edited by Sawhorse; 11 Dec 2008 at 05:59 PM.

  6. #6
    Join Date
    Feb 2007
    Posts
    210
    Plugin Contributions
    0

    Default Re: Admin order.php search products SQL Error 1054

    Thank you. this fixed my issues as well.

  7. #7
    Join Date
    Nov 2009
    Posts
    56
    Plugin Contributions
    0

    Default Re: Admin order.php search products SQL Error 1054

    Thanks, it fixed mine too . . . .

    Very grateful!

  8. #8
    Join Date
    Aug 2009
    Posts
    12
    Plugin Contributions
    0

    Default Re: [Done 1.3.9] Admin order.php search products SQL Error 1054

    thank you!I think I just fixed mine too!
    the search doesn't seem to work perfectly tho.
    there are two search boxes.The one on the left is called "search" and the one on the right "Search by Product Name or ID:XX or Model".The latter seems to work better than the former for some reason.

    The "search" box only responds to very few keywords(from the product titles).

    the "Search by Product Name or ID:XX or Model" box only seems to respond to the BEGINNING of the product name, not the END of the product name.

    Is anyone else having the same issue or is it just me?

    (I'm using 1.3.8a as well)

 

 

Similar Threads

  1. Replies: 14
    Last Post: 12 May 2010, 04:30 AM
  2. [Done v1.3.9a] New Products... results in SQL Error
    By llemberg in forum Bug Reports
    Replies: 6
    Last Post: 5 Dec 2009, 05:43 PM
  3. Replies: 2
    Last Post: 3 Sep 2006, 03:34 AM
  4. Replies: 4
    Last Post: 13 Jul 2006, 03:49 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