如何通过选择解密mysql中的String?

时间:2018-02-05 22:29:04

标签: php mysql encryption

我的表格中的2个字段已加密(电子邮件,名称),另一个字段未加密。

我使用函数 $ email = decrypt('email'); 来获取原始字符串。

如何将该功能用于mysql?

问题:如何在此查询中插入此功能: decrypt('email')? :

$query = mysqli_query($con, "select 'name', 'tel', 'adress', 'email' from users where id = 10");

用于加密工作:

INSERT INTO `users` (`name`, `tel`, `adress` , `email`) VALUES (encrypt($name),$tel, $adress, encrypt($email));

0 个答案:

没有答案