osCmax v2.5 User Manual
Results 1 to 5 of 5

Help with Mysql 5 Statement update

This is a discussion on Help with Mysql 5 Statement update within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; Hi Guys, I upgraded my web server and have since had to update to mysql 5. As I'm sure much ...

      
  1. #1
    osCMax Testing Team
    Join Date
    May 2006
    Posts
    83
    Rep Power
    12


    Default Help with Mysql 5 Statement update

    Hi Guys,

    I upgraded my web server and have since had to update to mysql 5. As I'm sure much of you have discovered you'll get some '1054 Unknown column 'p.products_id' in 'on clause' errors. I have fixed all of the areas where the problems have popped up, except for one, which is a query from my own highly modified version of featured_products.php I grew enough talent to create the query at the time, but apparently my talent has left. I have beat myself up to try to figure out what the correct new syntax for this query is, but I'm missing something. Can someone take a look and nudge me in the right direction? Thanks.



    Code:
    select distinct p.products_id, p.products_quantity, p.products_image, m.manufacturers_id, m.manufacturers_image, m.manufacturers_name, p.products_tax_class_id, s.status as specstat, s.specials_new_products_price, p.products_price,  d.short_desc            from " . TABLE_PRODUCTS . " as p left join " . TABLE_SPECIALS . " as s on (p.products_id = s.products_id), " . TABLE_PRODUCTS_TO_CATEGORIES . " as p2c, " . TABLE_CATEGORIES . " as c left join " . TABLE_FEATURED . " f on (p.products_id = f.products_id) left join " . TABLE_MANUFACTURERS . "  m on (p.manufacturers_id = m.manufacturers_id) left join " . TABLE_PRODUCTS_DESCRIPTION . " d on (p.products_id = d.products_id) where p.products_id = p2c.products_id and d.products_id = p2c.products_id and f.products_id = p2c.products_id and s.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . $featured_products_category_id . "' and p.products_status = '1' and f.status = '1' order by rand() DESC limit " . MAX_DISPLAY_FEATURED_PRODUCTS

  2. #2
    osCMax Testing Team
    Join Date
    Oct 2003
    Posts
    52
    Rep Power
    0


    Default Re: Help with Mysql 5 Statement update

    Hi, take a look at this query and you will see you have ( in the wrong places in your query:

    PHP Code:
    select distinct p.products_imagep.products_weightm.manufacturers_namem.manufacturers_idp.products_idpd.products_name from (products p left join products_to_products_extra_fields p2pef on p.products_id=p2pef.products_idleft join manufacturers m ON p.manufacturers_id m.manufacturers_id left join specials s on p.products_id s.products_idproducts_description pdcategories cproducts_to_categories p2c where p.products_status '1' and p.products_id pd.products_id and pd.language_id '3' and p.products_id p2c.products_id and p2c.categories_id c.categories_id and m.manufacturers_id '1' and ((pd.products_name like '%rubia%' or m.manufacturers_name like '%rubia%' or p2pef.products_extra_fields_value like '%rubia%' or pd.products_description like '%rubia%') ) order by pd.products_name 

  3. #3
    osCMax Testing Team
    Join Date
    May 2006
    Posts
    83
    Rep Power
    12


    Default Re: Help with Mysql 5 Statement update

    Bit late, but thanks for the help! I didn't realize that I didn't thank you previously...got so tied up in getting my shop working again.

  4. #4
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,699
    Rep Power
    22


    Default Re: Help with Mysql 5 Statement update

    Please note: If you using OSCMAX RC3 or earlier - it is NOT PHP version 5 or MySQL version 5 compatibly! (Please review compatibly in the specification.)

    However OSCMAX RC4 is compatible (but is currently only available as a beta in SVN).
    JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
    Try out our osCMax at: Live Catalog Demo
    Limited access Admin: Live Admin Demo
    Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!

  5. #5
    osCMax Testing Team
    Join Date
    May 2006
    Posts
    83
    Rep Power
    12


    Default Re: Help with Mysql 5 Statement update

    We just went through an security audit where the major credit card companies are requiring that my clients are conforming to a new universal security standard that was approved by all of the major CC companies.

    As part of this new security standard, they are requiring that the web servers be brought up to date with the latest PHP releases. So this breaks a lot of scripts. This will eventually effect EVERYONE who runs an OSC shop and also offers credit cards as a form of payment.

    Credit-card security standard issued after much debate - Network World

Similar Threads

  1. USPS Module Update - Update SQL - How???????
    By amcnally in forum osCmax v2 Customization/Mods
    Replies: 11
    Last Post: 07-16-2007, 06:31 AM
  2. Help with if then statement for price display
    By b5b4you in forum osCMax v2 Features Discussion
    Replies: 1
    Last Post: 04-10-2007, 10:20 AM
  3. MySQL? Please help!
    By extremenewb in forum osCommerce 2.2 Installation Help
    Replies: 3
    Last Post: 09-22-2004, 07:31 AM
  4. Help with greeting statement?
    By greg_pdq in forum osCmax v1.7 Discussion
    Replies: 1
    Last Post: 09-01-2004, 09:50 AM
  5. IF statement confusions.....
    By seank123 in forum osCommerce 2.2 Modification Help
    Replies: 2
    Last Post: 08-31-2004, 06:46 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •