tokkille Posted March 9, 2006 Share Posted March 9, 2006 When i try to recive data from my database i get the following error message (on the webpage): Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /customers/vahlne.se/vahlne.se/httpd.www/index.php on line 18My code in PHP looks as follows (from row 13(<?php)-24(?>)):<?phpinclude("XXX.php");$result = mysql_query("SELECT * FROM maraton1 ORDER BY Plats ASC",$db);echo "<table border=1 align=center cellspacing=2 cellpadding=3>\n";echo "<TR><TH>Plats<TH>Lag<TH>Poäng</TR>\n";while ($rad = mysql_fetch_array($result)) { echo "<TR><TD>$rad[Plats]<TD>$rad[Lag]<TD>$rad[Poäng]\n"; }echo "</TABLE>";?>Would be greatful for all help!!Thanks alot,Tokkille Quote Link to comment https://forums.phpfreaks.com/topic/4518-cant-recive-database-query/ Share on other sites More sharing options...
anatak Posted March 9, 2006 Share Posted March 9, 2006 Hello Tokkille,most likely you will have an error in your sql.please run the query like thismysql_query($Query) or die(mysql_error());this will get your the error and this error will help you.anatak Quote Link to comment https://forums.phpfreaks.com/topic/4518-cant-recive-database-query/#findComment-15728 Share on other sites More sharing options...
tokkille Posted March 9, 2006 Author Share Posted March 9, 2006 anatak,Thanks alot i fixed it!!!!! Im super grateful!!!!Tokkille Quote Link to comment https://forums.phpfreaks.com/topic/4518-cant-recive-database-query/#findComment-15730 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.