luxe Posted November 2, 2007 Share Posted November 2, 2007 Hey guys, Im a total php beginner, so I decided to practice doing a sort of blog site with cms. The problem I am having specifically is that when I view the articles I've posted, I want to be able to sort them by category using a jump menu I created with the categories populated through the db. Attached are my files including an sql file for the two db's I've linked together. The file in question is located in admin/view_article.php and lines 66-69. I've been stumped on this thing for weeks, and if anyone can figure it out....I'd tell them they were awesome and kiss their ass for the next week or so. [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
Moon-Man.net Posted November 2, 2007 Share Posted November 2, 2007 The lines you need to edit are 64-73 they are as follows: mysql_select_db($database_hogAdmin, $hogAdmin); if ( $myTopic = ""){ $myTopic = "`year` ASC" ; } else { $myTopic = "WHERE topic = " . $id_topart; } $query_getArticles = "SELECT * FROM blg_article_art INNER JOIN blg_topic_top ON idtop_art=id_top $myTopic ORDER BY" .$myTopic; Let me know if you need some explanation. Quote Link to comment Share on other sites More sharing options...
luxe Posted November 2, 2007 Author Share Posted November 2, 2007 hi there, Thanks for taking your time on this. I changed the code, and it appears to have a syntax error and I can't figure out what it is.... I do understand what you did though! Quote Link to comment Share on other sites More sharing options...
Moon-Man.net Posted November 4, 2007 Share Posted November 4, 2007 Cool, glad you understand, I can see where i stuffed up. But can you post the error and I'll have a look. Just wanna make sure where i'm wrong. And I'll explain it to you so you can fix it. Quote Link to comment Share on other sites More sharing options...
luxe Posted November 5, 2007 Author Share Posted November 5, 2007 well, it doesn't give me a particular error code. I just know that when I have wrong syntax in a php page, it doesn't display anything in firefox. And I'm working on a mac with mamp. Quote Link to comment Share on other sites More sharing options...
Moon-Man.net Posted November 6, 2007 Share Posted November 6, 2007 You need to turn debugging on in your php settings, with apache, its in php.ini. I don't know about what your using. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.