PHP Tutorials: Create a Search Engine (Part 3)
Create a search engine for any purpose. This search engine can be implemented anywhere to search your website content, or to search pages on the web.
Related Posts
23 Comments so far
Leave a reply
For the author:
$sql=mysql_query(“SELECT * FROM searchengine”);
while (list($id, $title, $description, $url, $keywords)=mysql_fetch_row($sql))
{
//code…
}
This is faster than the one in the tutorial, because mysql_fetch_assoc() is slower than mysql_fetch_row() because of the associative array that creates. Moreover you don’t have to use an extra line ($keywords=$getrow['keywords']) for each variable.
Where is the tutorial explaining associative array?
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:xampphtdocsxamppsearchenginesearch.php on line 37
No result found.
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:xampphtdocsxamppsearchenginesearch.php on line 37
No result found. plz help me to sort this error
hey why when i type anything it it shows the phpacdemy and yahoo not google
Question: is this gonna work for one table only? what if i have multiple tables?
check your parameter
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:UsersRootxampphtdocssearch.php on line 21
Huh?
Good video tuts!
how to we search more than one field. What if i wanted to search for someting in a state or city
Midlandsbassline, are you on of those guys that trolls videos and finds things to moun about?
try mysql_fetch_array($query)
hiiiii …
thanks i have created “Add to cart scriptt” but it was nt worked ..
please help me out for this script..
?can u make a script of add to cart…
Put the “explode” function above the while loop to cut down on page execution time.
thanks
There is an error with your mysql string the SELECT * FROM …. that part
you before you run the while loop do this
if(!is_resource($get)){die(‘ERRO: SQL SYNTAX’);}
// do while loop here
This is n ot easy dood, Its done with javascript/ DOM Events and an Xhtml Object, you need to have a php script that will just return the data need to populate the list and then you need the javascript to track what letters the user is inserting, as the user inserts one more letter than the javascript will tell the other file what the user is typing and return possible matches to the DOM / javascript code then use the result to populate a box under the input area !
Doo your shit lol atleast use mysql_real_escape_string so these young ones dont get hacked left right and center.. if you dont do security i suggest you learn it before u show tutorials.. and your phpBB tuts are putting all users at risk man…. learn the security before you carry on
hiiii thk alex…
can u make a search style like google
if we type a letter in textbox automatically
it can appear… means
“a list will open when me type some thing ….
please help me out for this…
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource
what is that i do everything write but its says that why
I have created an ADD-ON to this script which allows users to add their own search terms. Please message me for the link!
Many thanks Alex for this lovely tut!
Thanks for another create series!!!