I have user agent list from browscap to detect Device, Browser, Brand, and more. I'm already import to database, but now I'm get some problem to run because user agent format like this.
Mozilla/5.0 (*Windows NT 10.0*Win64? x64*) AppleWebKit/* (KHTML* like Gecko) Chrome/56.*Safari/*
And I'm checking my user agent using HTTP_USER_AGENT showing this
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
Browscap user agent have string *
Can I'm run using WHERE or WHERE LIKE in SQL? I'm already try with WHERE LIKE %% but not working correctly
UPDATE : I'm already try with simple PHP code like this and also not working
$ua = $_SERVER['HTTP_USER_AGENT'];
echo $ua;
$perintah = "SELECT * FROM useragent WHERE PropertyName = '".$ua."'";
$hasil = mysqli_query($con,$perintah);
while ($row = mysqli_fetch_array($hasil)){
echo $row['id'];
}
Please give me solution to resolve this problem. Thank You.