[英]i need to fetch records from one table where column value will be start with 'some value' and end with 'another some value'
$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>";
}
我必须将这些价值归类。 请查看图片以获取更多详细信息
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';
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.