mbdonner Posted August 2, 2007 Share Posted August 2, 2007 Hello - Thanks to anyone who might help me here! I have set up my database fine and uploaded files for a "Comments" script. The script includes a test page to demo how it works on my site. Well, the demo shows this warning: Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/content/m/b/d/mbdonner/html/comments/comments_show.php on line 38 error Table 'Comments5.page_comments' doesn't exist with query SELECT AVG(rating) from page_comments WHERE page_id='1' AND is_approved = '1' AND rating>'0' I did change some things in the config file, but nothing crazy - I understood everything (I guess!)... the main demo page is http://www.toplinepublishing.com/comments_demo.php Help! Thanks!!!! Quote Link to comment https://forums.phpfreaks.com/topic/63096-solved-help-me-take-a-look-at-this-warningplease/ Share on other sites More sharing options...
deadimp Posted August 2, 2007 Share Posted August 2, 2007 Your MySQL query isn't working (that's why there's a PHP warning about it not being a valid resource). Be sure that the table it's talking about exists. Quote Link to comment https://forums.phpfreaks.com/topic/63096-solved-help-me-take-a-look-at-this-warningplease/#findComment-314267 Share on other sites More sharing options...
mbdonner Posted August 2, 2007 Author Share Posted August 2, 2007 OK - cool - how do I do that? Quote Link to comment https://forums.phpfreaks.com/topic/63096-solved-help-me-take-a-look-at-this-warningplease/#findComment-314270 Share on other sites More sharing options...
soycharliente Posted August 2, 2007 Share Posted August 2, 2007 You log into your db and see if it's really there. Show the full line of code that the error is referencing. Quote Link to comment https://forums.phpfreaks.com/topic/63096-solved-help-me-take-a-look-at-this-warningplease/#findComment-314299 Share on other sites More sharing options...
mbdonner Posted August 2, 2007 Author Share Posted August 2, 2007 OK - there is no table in the database - I just checked on that. In the files I uploaded, there is a "SQL" folder with an sql file in there that is supposed to create the table if there isn't one by the name "page_comments" in there already. Well, there isn't a table by that name in there, but this sql file is not creating the table. What gives? Quote Link to comment https://forums.phpfreaks.com/topic/63096-solved-help-me-take-a-look-at-this-warningplease/#findComment-314335 Share on other sites More sharing options...
deadimp Posted August 2, 2007 Share Posted August 2, 2007 What sql file? Quote Link to comment https://forums.phpfreaks.com/topic/63096-solved-help-me-take-a-look-at-this-warningplease/#findComment-314369 Share on other sites More sharing options...
simcoweb Posted August 2, 2007 Share Posted August 2, 2007 I think you have to either: 1. run the SQL file to create the proper tables, or 2. copy and paste the SQL contents into the 'query' section of your PHPMyAdmin and create them If this is a program you downloaded then normally there's an installation file that would perform a lot of this. But, if that's not the case, then you need to manually run some of this stuff to set up your database. Quote Link to comment https://forums.phpfreaks.com/topic/63096-solved-help-me-take-a-look-at-this-warningplease/#findComment-314379 Share on other sites More sharing options...
mbdonner Posted August 3, 2007 Author Share Posted August 3, 2007 Hey Guys - simcoweb, deadimp, charlieholder - I figured it out - yes, I had to import that .txt file from the "SQL" folder. Since I really don't have a clue, but know the basics, the fact that that step was not in the installation "READ ME" file really threw me for a loop. Thanks so much for your time and interest. Quote Link to comment https://forums.phpfreaks.com/topic/63096-solved-help-me-take-a-look-at-this-warningplease/#findComment-314556 Share on other sites More sharing options...
simcoweb Posted August 3, 2007 Share Posted August 3, 2007 Cool Quote Link to comment https://forums.phpfreaks.com/topic/63096-solved-help-me-take-a-look-at-this-warningplease/#findComment-314564 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.