hi people i am new in php. I will do where I can search in my database.
problem is: Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in
my code
[php]require_once (’… / config.php’);
$ conn = mysql_connect (DB_HOST, DB_USER, DB_PASSWORD) or die (mysql_error ());
mysql_select_db (“DB_DATABASE”, $ conn);
$ search = $ _POST [‘search’];
$ sql = mysql_query (“select * from opi where model numbers like ‘% $ search%’ or name like ‘% $ search%’”, $ conn);
while ($ row = mysql_fetch_array ($ sql))
{
echo “
echo "<td width='60px' height='10px' valign='top' align='left' class='borderdb'>". $ row ['number']. "</ td>";
echo "</ tr>";
}
[/php]