Discussion Locked

Using mysql for search engines

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Using mysql, can i build a good search engine for my site: http://www.poeziile.com ?
I have a problem. In Romanian language we use some diacritics and i can't store them in mysql database. Or maybe i'm wrong so please correct me. Some links where you can see my site with diacritics:
http://www.poeziile.com
http://www.poeziile.com/ro/ghicitori.php
http://www.poeziile.com/ro/top40.php
http://www.poeziile.com/ro/top-autori.php
http://www.poeziile.com/ro/povesti.php

2 replies

by spotlightnight

Lets say that you would search in a table called: news and a column called newscontent. You would have to do something like that:

Let's say that phrase that you are searching for is in variable called $phrase

'.$titleofnews.'
'.$row['newscontent'];
}

if (!empty($found))
{
echo $found;
}else{
echo 'The phrase that you were searching for was not found. Sorry.';
}
?>

This is just an example.

Regards,
Pancha.

by jtherapist

eu trebuia sa salvez in baza de date caractere rusesti am facut un set de cereri pe care le-am pus in scriptul care realiza conexiunea la baza de date mysql. Vezi sa ai collation la campul in care salvezi info utf8

mysql_query("SET NAMES utf8");
mysql_query("SET CHARACTER SET utf8");
mysql_query("SET character_set_connection = utf8");

This discussion is closed to new replies.