Logged in as Green Lime, logoutQuery Failuer!
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/www/dbghome.mybesthost.com/forum.php on line 160
Warning: Wrong parameter count for mysql_free_result() in /home/www/dbghome.mybesthost.com/forum.php on line 190
Freeing Memory Failuer!
The Query Failuer! is the problem Im guessing any way. Bellow is the querry code that I am sending through the query function.
// Looking at a certain message //Open a connection to the database $hCon = mysql_connect( "mybesthost.com:3306", "+++++++++", "++++++" ); if(!$hCon){ echo "Connection Failed."; } $hDb = @mysql_select_db('dbghome_main', $hCon); if(!$hDb){ echo "Error: Selecting Database Message from Server!"; } //Build the SQL required to fetch all the messages in this //thread $sql = "SELECT Title, Body, Author, Date " ."FROM Message " ."WHERE MessageID=" .$_GET['MID']; $hStmt = mysql_query($sql,$hCon); if(!$hStmt) { echo "Query Failuer!"; } while ( $row = mysql_fetch_array($hStmt,$hCon) ) { $Reply = true; //Found at least one message //Clear the statement handle $FreeMem = mysql_free_result($hStmt,$hCon); if(!$FreeMem){ echo "\nFreeing Memory Failuer!"; }
There is code among that code but I dont see how any of it would effect my getting data from the database. Im stumped on why it wouln't recognize $hStmt as a Mysql resource when Im Assining the results of the quarry function to the variable.
Any one know whats going on?
[removed database name and password from query string- no point in advertising that- digitalmouse]