invalid link resource
Posted: Tue Aug 09, 2005 11:12 am
Hello I'm trying to pull some results from my database based off an input from a radio button. Then determine if it is the correct answer or not and I keep getting an errors.
Here is the relivant code
here is the error
anyone have any ideas as to what would make this SQL statement invalid? I used one almost identical to it further up in my code like so.
and it works perfect does exactly what its suppose to do which is what makes this soooo confusing.
Here is the relivant code
Code: Select all
$studentanswer= $_POST["answer"];
$qans = "Select * from tblAnswers where Answer='$studentanswer'";
$qansresult = odbc_exec($link,$qans);
$qanscorrect = odbc_result($qansresult,"Correct");Code: Select all
odbc_exec(): supplied argument is not a valid ODBC-Link resource in C:\\Web\\writequestion.php on line 88, referer: http://localhost/databasesessions.php
odbc_result(): supplied argument is not a valid ODBC result resource in C:\\Web\\writequestion.php on line 89, referer: http://localhost/databasesessions.phpCode: Select all
$queryanswers = "Select * from tblAnswers where QuestionCode ='$questioncode'";