I am getting the following error:
To connect, I am using the following code and it seems to work fine, no error.Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/*****/public_html/***/mysql.php on line 69
Code: Select all
$dbhost = 'localhost:3306';
$dbuser = 'DBUSER';
$dbpass = 'DBPASS';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die (mysql_error());
if (!$conn)
{
die('Could not connect: ' . mysql_error());
}
$conId = $conn;
$dbname = 'tulipus1_products';
mysql_select_db($dbname) or die (mysql_error());To search I am using the following code:
Code: Select all
$query = ‘SOME SEARCH QUERY’;
$this->result=mysql_query("SELECT * FROM products where Description LIKE '%$query%'",$this->conId) or die(mysql_error());
return new Result($this,$this->result) or die(mysql_error());I have done a lot of research on the error
Please Help.
Thanks in advance!