Results 1 to 3 of 3

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

      
  1. #1
    New Member
    Join Date
    May 2003
    Posts
    24
    Rep Power
    0


    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
    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;
    $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!

  2. #2
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,501
    Rep Power
    567


    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 installation service - Have our professionals install osCmax on your server - same day service!
    osCmax 2.0 User Manual - the must have beginners guide to osCmax v2.0

    Stay Up To Date with everything osCMax:
    Free osCMax Newsletters - Security notices, New Releases, osCMax News
    osCMax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  3. #3
    New Member
    Join Date
    May 2003
    Posts
    24
    Rep Power
    0


    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!

Similar Threads

  1. valid XHTML Catalog Side 2.3---is this mod compatible with--
    By Christy in forum osCmax v2 Customization/Mods
    Replies: 2
    Last Post: 11-04-2006, 09:03 PM
  2. Advance Search Result Issue
    By auntie22 in forum osCmax v1.7 Discussion
    Replies: 0
    Last Post: 05-10-2006, 11:01 PM
  3. Warning: mysql_result(): supplied argument is not a valid My
    By doumawis in forum osCmax v1.7 Discussion
    Replies: 0
    Last Post: 02-27-2005, 06:49 AM
  4. EasyPopulate:Images Valid & U/L, then "Can't find i
    By xoomxoomang in forum osCommerce 2.2 Modification Help
    Replies: 3
    Last Post: 06-18-2004, 10:08 PM
  5. Change in result output ... How ?
    By aliharis2004 in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 01-19-2004, 06:15 PM

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
  •