Regexp ile MYSQL REQUERY değişken

0 Cevap php

HI, ben aşağıdaki kodu çalışıyorum.

 $domain = $_GET['url'];
 $sql = 'SELECT * FROM `domains` WHERE `domain` REGEXP CONVERT(_utf8 \'$url\' USING latin1) COLLATE latin1_swedish_ci';
 $result = mysql_query($sql);

 while($row = mysql_fetch_array($result, MYSQL_NUM))
{
    echo "id :{$row[0]} <br>";

}

will get the domain from user using $_GET and then regex that from database .. This query is not working , please tell me the proper syntax I even tried double quotes \"$domain"\

0 Cevap