遇到SQL查询问题。
请说得对。
$scope.downloadFile = function(key) {
service.downloadFile().then(function(result) {
var blob = new Blob([result], {
type: 'application/octet-stream; charset=utf-8'
});
var urlCreator = window.URL || window.webkitURL || window.mozURL || window.msURL;
var url = urlCreator.createObjectURL(blob);
var element = angular.element('<a/>');
element.attr({
href: url,
target: '_blank',
download: key
})[0].click();
});
}
任何帮助将不胜感激!!!
答案 0 :(得分:0)
试试这个:
$getAds=mysql_query("SELECT * FROM advertises WHERE `status`='RUNNING' AND adult='1' AND (country LIKE '%$test%' OR country='ALL') AND (device LIKE '%$pabu%' OR device='ALL') ORDER BY rand() LIMIT 0,1");
状态是关键词