특정웹페이지 로그인 아이디 변수로 가져오기

특정웹페이지 로그인 아이디 변수로 가져오기

QA

특정웹페이지 로그인 아이디 변수로 가져오기

본문

구글차트를 그리는 웹페이지가 있는데 쿼리문에서 유저아이디를 검색해서 데이터를 뽑을려고 

 

php중간에 $user_Id = $member['mb_id'];

 

이렇게 넣고 쿼리문은 

$query = '
SELECT times,UNIX_TIMESTAMP(CONCAT_WS(" ", dates, times)) AS datetime,
    max(case when machine_no = 1 then ph end) machine1,
    max(case when machine_no = 2 then ph end) machine2,
        max(case when machine_no = 3 then ph end) machine3,
        max(case when machine_no = 4 then ph end) machine4,
        max(case when machine_no = 5 then ph end) machine5,
        max(case when machine_no = 6 then ph end) machine6    
FROM drain
where user ='."'".$usre_Id."'".' 
group by times
ORDER BY times DESC

';

 

쿼리문 날려보니 데이터가 안날라와서 

echo $user_Id = $member['mb_id'];

해보니 아이디와 함께 뒤에 알수없는 문자들이 함께 따라오네요.

아이디만 변수로 따로 받을수없을까요?

 

도움 부탁드립니다.

 

이 질문에 댓글 쓰기 :

답변 1

답변을 작성하시기 전에 로그인 해주세요.
전체 123,609 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT