我想制作一个表格形式,使用
中的if语句使用查询过滤显示import {Injectable} from '@angular/core';
import {CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot} from '@angular/router';
import {Observable} from 'rxjs/Rx';
import {LoginService} from './login/login.service';
@Injectable()
export class AuthGuard implements CanActivate {
constructor(private loginService: LoginService) {}
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> | boolean {
return this.loginService.signin()
}
}
这是我的导航栏
if(!$status) die("Failed to select database!");
@$sql = "SELECT * FROM t_pdf Order by year desc, dotype asc, ref desc ";
if(@$_SESSION['nav']=='DC'){
@$sql = "SELECT * FROM t_pdf where dotype LIKE '%D.C.%' Order by year desc, dotype asc, ref desc ";
}
当我点击DC,DO,IC等时,它会改变它的sql并用
编辑它&#34;从表中选择*,其中control_number类似于&#39;%D.C。%&#39;&#34;
我怎么能改变这里的逻辑?我在这里使用php ....