I'm on my last stage and I can't get this query to work. Returns error $query4 = "SELECT from categories where(categories = '$category')"; $result4 = mysql_db_query($db, $query4); $r = mysql_fetch_array($result4); $bodydescrip = $r["bodydescrip"]; Code (markup): I'll be the first to admit I have no clue how to do. SO as I always do I've been trying to modify something until I can get it to work.. but not this time.. thks for any help
The error you received typically means that your query returned no records (results) but that you then went on to try and use the result of that query... which it can't do since there wasn't a result. So you should check to see why the query isn't returning any results.
Replace: $query4 = "SELECT from categories where(categories = '$category')"; With: $query4 = "SELECT from categories where categories='$category'"; Then check your DB and ensure that - categories is an actual table in the DB - categories is an actual field within the table called categories Try not to use the exact same name for everything
Thanks George, I actually resolved this a few days ago. I didnt pick the names ... that is the way the script was written that I am working with... that may the worst case scenerio in the whole thing.. all the other category fields at least have a number beside them..