$nqry = mysql_query("select * FROM table_name where column_name BETWEEN 'AlertStopPressed' AND 'AlertStart'");
while($nftc = mysql_fetch_array($nqry)){
echo $nftc['user_id']." - ".$nftc['alert_detail_id']." - ".$nftc['name']." - ".$nftc['alert_datetime']."<br>";
}
我必须对这些值进行分组。 please see the image for more details
答案 0 :(得分:0)
select * from table where columnname like 'startvalue%endvalue';
您的查询
$nqry = mysql_query("select * FROM table_name where column_name BETWEEN 'AlertStopPressed' AND 'AlertStart'") and columnname like 'startvalue%endvalue';