osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

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 ...



Find us on Facebook
Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Customization/Mods

Connect with Facebook Register FAQDonate Members List Calendar Mark Forums Read


Closed Thread

 

LinkBack Thread Tools
  #1  
Old 07-02-2008, 11:20 AM
osCMax Testing Team
 
Join Date: May 2006
Posts: 61
Thanks: 0
Thanked 4 Times in 4 Posts
Rep Power: 4
fourmat is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #2  
Old 07-12-2008, 09:46 PM
osCMax Testing Team
 
Join Date: Oct 2003
Posts: 52
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
icecold
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 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 01-15-2009, 06:20 AM
osCMax Testing Team
 
Join Date: May 2006
Posts: 61
Thanks: 0
Thanked 4 Times in 4 Posts
Rep Power: 4
fourmat is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 01-15-2009, 07:40 AM
jpf's Avatar
jpf jpf is offline
Moderator

 
Join Date: Sep 2003
Location: Manitoba, Canada
Posts: 2,681
Thanks: 12
Thanked 214 Times in 196 Posts
Rep Power: 20
jpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud of
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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5  
Old 01-15-2009, 07:48 AM
osCMax Testing Team
 
Join Date: May 2006
Posts: 61
Thanks: 0
Thanked 4 Times in 4 Posts
Rep Power: 4
fourmat is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

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


All times are GMT -8. The time now is 02:44 PM.


Powered by vBulletin®
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO
Copyright 2009 osCMax
Inactive Reminders By Icora Web Design