Connecting Tech Pros Worldwide Forums | Help | Site Map

mysql_fetch_array(): supplied argument is not a valid MySQL result resource in...

mideastgirl's Avatar
Member
 
Join Date: Jun 2009
Location: Indiana
Posts: 65
#1: Aug 20 '09
What does this error mean?

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/content/m/i/d/mideasthonors/html/student_session_proposal_success.php on line 109
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3

This is the code, but I am not seeing what they are talking about:

Expand|Select|Wrap|Line Numbers
  1.    <?
  2. include("admin-dbcon.php");
  3. $ID=$_GET['sessionproposalID'];
  4. $sessionsql=mysql_query("SELECT primary_contact, primary_email, primary_institution, presenter_2, presenter_2 email, presenter_2 institution,
  5. presenter_3, presenter_3 email, presenter_3 institution, presenter_4, presenter_4 email, presenter_4 institution, abstract_title, abstract_description,
  6. session_length, session_category, av_equipment, MONTHNAME(dtAdded) as month, YEAR(dtAdded) as year, DAYOFMONTH(dtAdded) as day FROM student_session_proposals WHERE ID=$ID");
  7. $row=mysql_fetch_array($sessionsql) or die(mysql_error());
  8. echo "<b>Thank You!</b><br/>";
  9. echo "Your prpopsal has been received. Below is your confirmation information.</p>";
  10. echo "<table cellpadding=\"0\" cellspacing=\"0\" width=\"600\" border=\"0\">";
  11. echo "<tr>";
  12. echo "<td valign=\"top\"><p><b>";
  13. echo $row["primary_contact"];
  14. echo "&nbsp;";
  15. echo $row["primary_email"];
  16. echo "&nbsp;";
  17. echo $row["primary_institution"];
  18. echo "&nbsp;";
  19. echo $row["presenter_2"];
  20. echo "&nbsp;";
  21. echo $row["presenter_2 email"];
  22. echo "&nbsp;";
  23. echo $row["presenter_2 institution"];
  24. echo "&nbsp;";
  25. echo $row["presenter_3"];
  26. echo "&nbsp;";
  27. echo $row["presenter_3 email"];
  28. echo "&nbsp;";
  29. echo $row["presenter_3 institution"];
  30. echo "&nbsp;";
  31. echo $row["presenter_4"];
  32. echo "&nbsp;";
  33. echo $row["presenter_4 institution"];
  34. echo "&nbsp;";
  35. echo $row["abstract_title"];
  36. echo "&nbsp;";
  37. echo $row["abstract_description"];
  38. echo "&nbsp;";
  39. echo $row["session_length"];
  40. echo "&nbsp;";
  41. echo $row["session_category"];
  42. echo "&nbsp;";
  43. echo $row["av_equipment"];
  44. echo "&nbsp;";
  45. echo "</b>";
  46. echo "<br/>";
  47.  
  48. mysql_free_result($sessionsql);
  49. ob_end_flush();
  50.   ?>
  51.  

Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,660
#2: Aug 20 '09

re: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in...


try this:
Expand|Select|Wrap|Line Numbers
  1. $sessionsql=mysql_query(…) or die(mysql_error());
Reply

Tags
mysql, not valid