Hey we are trying to set up a ticket system and we are having some issues. We keep getting these warning/errors. Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in [path]/arenacp/openapplication.php on line 327 Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in [path]/arenacp/openapplication.php on line 327 I don't fully understand what is going on here. This is the section of the code where the problem is. It goes from Line 312 to 346 print_textarea_row("", 'comments[comments]', '', 10, 130); print_cells_row(array("", "<input type='hidden' name='comments[appid]' value='$apps[appid]' /><input type='submit' name='comment' value='Comment'></form>")); echo'<meta http-equiv="refresh" content="0;url=openapplication.php?do=view&id=$getcuser[appid]"/>'; print_table_break('', "900"); print_table_header("<form method='post'>Response"); $questions=mysql_query("SELECT responseid,title,userid,DATE_FORMAT(responded,'%m/%d/%Y') FROM appcomments WHERE appid='$apps[appid]' ORDER BY responded DESC"); while(list($responseid,$title,$userid,$responded)=mysql_fetch_row($questions)){ <<<--- Line 327 $getcuser=mysql_query("SELECT * FROM " . TABLE_PREFIX . "user WHERE userid='$userid'"); $getcuser=mysql_fetch_array($getcuser); print_cells_row(array("<a href='../member.php?u=$getcuser[userid]'>$getcuser[username]</a> says:<br />$responded", "$title")); } print_textarea_row("", 'Respnce[response]', '', 10, 130); print_cells_row(array("", "<input type='hidden' name='Response[appid]' value='$apps[appid]' /><input type='submit' name='Response' value='Response'></form>")); echo'<meta http-equiv="refresh" content="0;url=openapplication.php?do=view&id=$getcuser[appid]"/>'; print_table_break('', "900"); ?> PHP: Any help would be greatly appreciated.
Nope no cursor, basically this is when staff want to view their application or if we want to add some comments on it we keep getting these errors. I'm feeling that it can't find the staff application ID number which is why I keep getting the error. I don't know how to go about correcting it.
Have you try adding the database to the appcomments table(Ex: DATABASENAME.appcomments ). Is the appcomments in the same database/schema as the other tables? I noticed " . TABLE_PREFIX . " in the You dont have it in And have you try to print the query thru php? and run it directly in an SQL tool?