Tuesday, January 4, 2011

CrazyEngineers Forum - Computer Science & IT Engineering

CrazyEngineers Forum - Computer Science & IT Engineering


Creating Search Engine: MySQL Warning

Posted: 03 Jan 2011 07:32 AM PST

hello,

i am creating a search engine..

and i am getting an error

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in c:\wamp\www\major project\search.php on line 22

in the command written below

sql_select_db ("music_park");

$get= mysql_query("SELECT * from searchengine");
while ($getrow= mysql_fetch_assoc($get))
{

//explode our search

$search_explode = explode(" ", $search);

foreach ($search_explode as $search_each)
{
//construct query

$x++;
if ($x==1)

$construct .= "keywords LIKE '%$search_each%'";
else
$construct .= "OR keywords LIKE '%$search_each%'";

}

//echo out construct

$construct = "SELECT * from searchengine WHERE '$construct'";
$run = mysql_query ('$construct');
$foundnum = mysql_num_rows('$run');

if ($foundnum ==0)
echo "no result found";
else
{
echo "$foundnum result found! <p>";
}
}


please somebody help me out to remove this error..

thank you very much...!!!

java.lang.ClassCastException: org.apache.struts.action.RequestProcessor exception??

Posted: 03 Jan 2011 04:56 AM PST

i have serached on google but i was enable to find answer to this exception. please help!!:confused:

No comments:

Post a Comment