Function with Query
Posted: Wed Dec 28, 2005 10:56 pm
I have function that executes a query in order to echo a record. Here is the code:
I have echoed out my query and the variable $topicID is indeed passing successfully. However, I get these two errors:
(*paths were covered for security in the error warning, but they are correct*)
Code: Select all
function getTopic($topicID){
mysql_select_db($database_econtrolt411, $econtrolt411);
$query_getTopic = "SELECT * FROM var_topic WHERE topicID='$topicID'";
$getTopic = mysql_query($query_getTopic, $econtrolt411) or die(mysql_error());
$row_getTopic = mysql_fetch_assoc($getTopic);
$totalRows_getTopic = mysql_num_rows($getTopic);
echo $row_getTopic['topicNAME'];
}Any ideas as to what is going wrong?Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in c:\domains\domain.com\....\functionsLIST.php on line 97
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in c:\domains\domain.com\....\functionsLIST.php on line 100
(*paths were covered for security in the error warning, but they are correct*)