osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

supplied argument is not a valid MySQL result resource ...

This is a discussion on supplied argument is not a valid MySQL result resource ... within the osCMax v1.7 Discussion forums, part of the osCMax v1.7 Forums category; this is a brand new install of msMAX v1.5 here is the total error I am getting Warning: mysql_result(): supplied ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v1.7 Forums > osCMax v1.7 Discussion

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 10-29-2003, 06:37 PM
New Member
 
Join Date: May 2003
Posts: 24
Thanks: 1
Thanked 1 Time in 1 Post
Rep Power: 0
Dragonmom
Default supplied argument is not a valid MySQL result resource ...

this is a brand new install of msMAX v1.5
here is the total error I am getting
Quote:
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/dragon/public_html/skelly/catalog/catalog_products_with_images.php on line 341

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 71 in /home/dragon/public_html/skelly/catalog/catalog_products_with_images.php on line 344

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 72 in /home/dragon/public_html/skelly/catalog/catalog_products_with_images.php on line 346
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 '' at line 1

select distinct p.products_id, p.products_image, p.products_model, p.products_quantity, p.products_weight, pd.products_name, p.manufacturers_id, p.products_price, p.products_date_added, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, m.manufacturers_name, pd.products_description, cd.categories_name from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join categories_description cd on p2c.categories_id = cd.categories_id left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and cd.language_id = '1' order by cd.categories_name, pd.products_name LIMIT 0,
[TEP STOP]
Here is the code that seems to be at fault;
Quote:
$products_query_raw = "SELECT distinct p.products_id, p.products_image, p.products_model, p.products_quantity, p.products_weight, pd.products_name, p.manufacturers_id, p.products_price, p.products_date_added, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, m.manufacturers_name, pd.products_description, cd.categories_name from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_CATEGORIES_DESCRIPTION . " cd on p2c.categories_id = cd.categories_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . $languages_id . "' and cd.language_id = '" . $languages_id . "' order by $order";
$products_query = tep_db_query($products_query_raw);
//Discount used for Customer Discount Mod
if (PRODUCT_LIST_CUSTOMER_DISCOUNT) {
$discount = mysql_result(mysql_query("SELECT customer_discount from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'"), 0 , 0);
}
// Number of products to display per page
$limit = mysql_result(mysql_query("SELECT configuration_value from " . TABLE_CONFIGURATION . " WHERE configuration_key = 'PRODUCT_LIST_CATALOG_PERPAGE'"), 0 , 0);
What I THINK is the query_raw call is incorrect, I haven't seen that anywhere else. Am I right? Wrong?
__________________
making a little magic- one pointed stick at a time!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
  #2  
Old 10-29-2003, 08:32 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 11,083
Thanks: 81
Thanked 348 Times in 327 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
Default

I'm running the exact same version you are, and I do not get that error. What version of php,mysql are you using? Did you run the installer for ms2-max and import the database?

There is not a problem with ms2-max, so I am thinking it has to be something in your setup.
__________________
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!
  #3  
Old 10-30-2003, 07:53 AM
New Member
 
Join Date: May 2003
Posts: 24
Thanks: 1
Thanked 1 Time in 1 Post
Rep Power: 0
Dragonmom
Default

I'm running
PHP Version 4.3.1
Mysql Version 3.23.56
I'm pretty sure I imported the database, everything else seems to be working.
Is there a DB table I'm missing?
I looked at the php documentation and couldn't find anything that relates to that command, "_query_raw"
__________________
making a little magic- one pointed stick at a time!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
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
valid XHTML Catalog Side 2.3---is this mod compatible with-- Christy osCMax v2 Customization/Mods 2 11-04-2006 09:03 PM
Advance Search Result Issue auntie22 osCMax v1.7 Discussion 0 05-10-2006 11:01 PM
Warning: mysql_result(): supplied argument is not a valid My doumawis osCMax v1.7 Discussion 0 02-27-2005 06:49 AM
EasyPopulate:Images Valid & U/L, then "Can't find i xoomxoomang osCommerce 2.2 Modification Help 3 06-18-2004 10:08 PM
Change in result output ... How ? aliharis2004 osCommerce 2.2 Modification Help 0 01-19-2004 06:15 PM


All times are GMT -8. The time now is 11:50 AM.


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