This question already has answers here:
SQL Query with binary data (PHP and MySQL)
(3个答案)
12个月前关闭。
我有一个名为mytable的表,它包含一行以下数据:
uid: 1 (type: int(10))
email: it is visible as 971f2d23 in phpMyAdmin (type: varbinary(16))
我想运行这样的SELECT查询:
$conn->query("SELECT * FROM mytable WHERE email=971f2d23");

但这不会返回任何行。
我也试过:
$conn->query("SELECT * FROM mytable WHERE email=0x971f2d23");

但还是没有争吵。
任何帮助都将不胜感激。
谢谢!

最佳答案

试试这个

$conn->query("SELECT * FROM mytable WHERE email='971f2d23'");

10-04 21:15