Cocaberry Posted May 21, 2011 Share Posted May 21, 2011 I am trying to install the admin product paging v 6.0 contribution and the search patch that was released after that. After making changes to my categories.php file, I am getting an SQL error. My categories.php file was already modified to begin with. I have Extra Product Fields, Additional Images, and some other contributions installed. The SQL error I am getting is: 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 'Resource id #49' at line 1 select count(*) as total Resource id #49 I'm not sure where the problem is in the code. Any help would be appreciated. My categories.php file is too long to post the code. I've zipped it and posted it at http://www.cocaberrymusic.com/categories.zip I am using OSC version v2.2 RC2a. Link to comment Share on other sites More sharing options...
Cocaberry Posted May 22, 2011 Author Share Posted May 22, 2011 Can someone please help me out with this? Link to comment Share on other sites More sharing options...
MrPhil Posted May 22, 2011 Share Posted May 22, 2011 Resource id #49 makes no sense as part of an SQL query. Does the full query get displayed anywhere when you run this? It would be helpful to see the full SQL query that's failing. The PHP file you attached has only one SQL query: $cPath_query = "select distinct products_id, categories_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id= '" . $pInfo->products_id . "' "; $cPath_fetch = mysql_fetch_array(mysql_query($cPath_query)); $cPath2 = $cPath_fetch['categories_id']; at line 1608. I don't see anything in there that should produce such an error -- in fact, I don't see anything resembling "select count(*) as total" in your code. It does not appear to involve this file. There's nothing in stock osC "select count(*) as total " either (where the next word isn't "from"). I would first scan all your files for "Resource id #49" and hope you get a lucky hit. If not, that phrase may be part of some internal SQL error message that somehow got sucked into another query. Good luck -- you're going to need it to ferret out this problem. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.