can't search _ or _ 2 field in database,
below is my code and I used before in other project, but now if I set like this for search keyword in two field, it only can search the 2nd field, I can't figure why? How to fix this make it work?
Thanks.
php
$keyword = mysql_real_escape_string($_POST['keyword']);
$sql = "select * from $table where subject or content like '%$keyword%';";
$query = mysql_query($sql);
while($list = mysql_fetch_array($query)){
$id = $list[id];
$subject = $list[subject];
$content = $list[content];
}
mysql
id mediumint(6) AUTO_INCREMENT INDEX
subject text utf8_unicode_ci
content longtext utf8_unicode_ci PRIMARY UNIQUE INDEX