osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

Product Extra Fields

This is a discussion on Product Extra Fields within the New osCommerce Contributions forums, part of the osCommerce 2.2 Forums category; MYSQL QUERY ERROR REPORT --------------------------------------- 1064 - You have an error in your SQL syntax; check the manual that corresponds ...


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > New osCommerce Contributions

Register FAQ Members List Calendar Mark Forums Read


Welcome to osCMax Join osCMax Now! Download osCMax Here
Reply

 

LinkBack Thread Tools
  #1  
Old 10-31-2008, 11:10 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 11,482
Thanks: 83
Thanked 356 Times in 334 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Post Product Extra Fields

MYSQL QUERY ERROR REPORT
---------------------------------------
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and ptf.products_extra_fields_value'' and (pef.languages_id='0' or pef.languag' at line 1

product_info.php

$extra_fields_query = tep_db_query("
SELECT pef.products_extra_fields_status as status, pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value
FROM ". TABLE_PRODUCTS_EXTRA_FIELDS ." pef
LEFT JOIN ". TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS ." ptf
ON ptf.products_extra_fields_id=pef.products_extra_fi elds_id
WHERE ptf.products_id=". (int)$HTTP_GET_VARS['products_id'] ." and ptf.products_extra_fields_value'' and (pef.languages_id='0' or pef.languages_id='".(int)$languages_id."')
ORDER BY products_extra_fields_order");

Replace the following

$extra_fields_query = tep_db_query("
SELECT pef.products_extra_fields_order, pef.products_extra_fields_status as status, pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value
FROM ". TABLE_PRODUCTS_EXTRA_FIELDS ." pef
LEFT JOIN ". TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS ." ptf
ON ptf.products_extra_fields_id=pef.products_extra_fi elds_id
WHERE ptf.products_id=". (int)$HTTP_GET_VARS['products_id'] ." and ptf.products_extra_fields_value'' and (pef.languages_id='0' or pef.languages_id='".(int)$languages_id."')
ORDER BY pef.products_extra_fields_order");


More...
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates designed for osCMax 2. Loyalty discounts up to 30% off!
    Each purchase supports the osCMax project with much needed funds!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. Default multi server configuration for exceptional performance!

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

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
Product Extra Fields michael_s New osCommerce Contributions 0 09-30-2008 04:15 PM
Product Extra Fields michael_s New osCommerce Contributions 0 07-21-2008 11:11 AM
Product Extra Fields michael_s New osCommerce Contributions 0 11-25-2007 08:00 PM
Product Extra Fields michael_s New osCommerce Contributions 4 04-01-2007 05:27 AM
Product Extra Fields michael_s New osCommerce Contributions 0 02-07-2007 02:50 PM


All times are GMT -8. The time now is 01:32 PM.


Powered by vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax