Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resour
Posted 03 July 2006 - 05:32 AM
Anyway, there is a "classifieds" section where you can browse by category & subcategory(similar to craigslist) and run searches. When I loaded up the software for the first time everything worked fine, you could post ads and run searches & everything was peachy.
Last night, I went into the "admin" section, and deleted all the categories and subcategories and added my own.
Now, when I try to run a search I get the following message:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/bakespac/public_html/friends/functions.php on line 28
Here's the source:
return mysql_num_rows($sql_res); -------------------------------->Line 28
Anyone have any ideas what the hell is going on here?
Posted 03 July 2006 - 06:24 AM
To be a coder, you must learn how to think and not to give up so easily.
Posted 03 July 2006 - 07:13 AM
Here's the thing...
I believe the code I posted is supposed to execute a search and return the result..Right?
Well, There are about 10 different search engines in the site. Search for people, groups, tribes, forum posts, etc,etc,....All of them work fine except for this one.
Personally, seeing as the "admin area" of the site sucks, I have a feeling that when I deleted ALL the catagories from the classified section, and added my own(Using the janky Admin Area), somehow the table structure was modified and thats why I'm getting the error. Is this possible?
Posted 03 July 2006 - 07:25 AM
It assigned all the "main categories" with a cat_id tag incrementing by 1000. But then Assigned all the subcategories sub_cat_id tags incrementing by 1. Meaning that the category and subcategory of For Sale ->Cars was created in the MySql Database as:
When It should have been
I had 25 categories with about 200 sub categories and everytime you clicked on a subcategory...ERROR
I had to manually go into mysql database and add the prefixes to fix it......
Whoever made this product blows...and support is nonexistent..
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users