searc difference between Upper and lower strings
Posted: Thu Jan 11, 2007 3:57 pm
Hi all
I'm using following code to create query on mysql db
and I get difference between Upper and lower strings. Is there a way to avoid this difference?
Thank you
regards ddragas
I'm using following code to create query on mysql db
Code: Select all
$pojam = "some search string";
$imena_polja_tabela1= array();
$query1 = "select * from kategorije ";
$result1 = mysql_query($query1);
$broj_polja1 = mysql_num_fields($result1);
for ($i1=1; $i1<$broj_polja1; $i1++)
{
$imena_polja_tabela1[]= mysql_field_name($result1, $i1);
}
foreach($imena_polja_tabela1 as $key1 => $val1)
{
$sql_search1 .= $val1 . " LIKE '%$pojam%' or ";
}
$sql_search1 = substr($sql_search1, 0, -3);
$result1 = "SELECT * from kategorije WHERE (" . $sql_search1 . ")";Thank you
regards ddragas