usersim感兴趣我如何选择一个文本字段形式我的mysql数据库,我有一个名为用户名为用户名为“profile_fields”的用户信息存储在哪里的用户表。我如何在PHP中访问它并删除它?我想删除未验证的人员。从php中选择一个文本字段在php
PHP代码
<?php
//Working connection made before assigned as $connection
$time = time();
$query_unactive_users = "DELETE FROM needed WHERE profile_fields['valid_until'] < $time"; //deletes user if the current time value is higher then the expiring date to validate
mysqli_query($connection , $query_unactive_users);
mysqli_close($connection);
?>
在phpMyAdmin领域显示了(从随机用户行choosen):
a:1:{s:11:"valid_until";i:1370695666;}
是“... WHERE profile_fields [ 'valid_until'] ... “正确的方法?
为什么不用简单的'valid_until'日期列?我看到你可以直接在MySQL中查询的唯一方法是使用正则表达式......这将是丑陋的。 – rixo