The active result for the query contains no fields

Hi guys, i am getting the following error : The active result for the query contains no fields

Below is my code

include ‘dbconnect_two.php’;


//The part below is the one that does the query to retrieve the messages from the database

$sql_message_retriver="SELECT message FROM inbox WHERE message_id=‘$message_id’ ";

echo “<right>$message_string</right>”;


echo “<form action=// method=post>”;
echo"Message:<input type=text name=update>“;
echo “<input type=hidden name=message_id value=$message_id>”; // gotta fix this part
echo “<input type=hidden name=maxseq value=$maxseq>”;
echo “<input type=hidden name=otheruser value=$otheruser>”;
echo “<input type=hidden name=otheremail value=$otheremail>”;
echo “<input type=hidden name=keyes value=$keyes>”;
echo “<input type=submit name=submit value=Reply>”;



The exact error i get:[B][FONT=Arial Black][COLOR=“#0000CD”]Array ( [0] => Array ( [0] => IMSSP [SQLSTATE] => IMSSP [1] => -28

 =&gt; -28 [2] =&gt; The active result for the query contains no fields. [message] =&gt; The active result for the query contains no fields. ) )[/COLOR][/FONT][/B]

Here is one suggestion i found to solve the problem from other forums: use the sqlsrv_next_result. I used it and it says ODBC function sequence error(something like that).

Here is something else to note, when i change my sql statement to say like this: [COLOR="#0000CD"]$sql_id_two="SELECT message FROM inbox WHERE message_id='1216' AND to_email='$email' OR from_email='$email'"; [/COLOR] [FONT=Arial Black][B]It actually works and displays the message. its weird.[/B][/FONT] someone pls help and also can someone explain what this error means, there is very little explanation on the internet and they are kinda confusing. pls help.

Spelling is a wonderful thing. Mis-spelling is not. That’s the trouble with creating long var names.

I shall remember that line for the rest of my life… You just made my day. Seriously. Thanks a million ginerjm!!! Found the misspelling