MySQL Forums
Forum List  »  PHP

Re: mysql_num_rows(): supplied argument is not a valid MySQL result
Posted by: stef an
Date: May 21, 2012 12:15PM

found it!!!
file is called mysql.ssi.php and this is the code it contains:
<?php
function runQuery($query) {
	$connect = mysql_connect(MYSQL_SERVER, MYSQL_USERNAME, MYSQL_PASSWORD);
	if (!$connect) {
		die("<div class=\"error\">" . mysql_error() . "</div>");
	}
	mysql_select_db(MYSQL_DATABASE, $connect);
	$result = mysql_query($query, $connect);
	return $result;
}

file is in a different folder

Options: ReplyQuote


Subject
Written By
Posted
Re: mysql_num_rows(): supplied argument is not a valid MySQL result
May 21, 2012 12:15PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.