출석부 질문드립니다.

출석부 질문드립니다.

QA

출석부 질문드립니다.

본문

http://sir.co.kr/bbs/board.php?bo_table=g5_skin&wr_id=1340 

 

를 설치했습니다만

 


select id from where mb_id = 'chatsite' and substring(datetime,1,10) = '2013-11-01' 

1064 : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where mb_id = 'chatsite' and substring(datetime,1,10) = '2013-11-01'' at line 1 

error file : /plugin/attendance/attendance.php 

 

라는 버그가 떠서.................큰일입니다..ㅠㅠ


댓글으보니 DB생성이 잘안되서 그렇다는데.


DB를 지우고 새로 깔아야 하는지 강제로 DB를 생성해야하는지 알려주실 수 있나요?

이 질문에 댓글 쓰기 :

답변 2

select id from where mb_id = 'chatsite' and substring(datetime,1,10) = '2013-11-01'
이게 실제 쿼리문 이신가요? 테이블 명이 없는 것 같은데...

실제 쿼리문은 select id from g5_attendance where mb_id = 'admin' and substring(datetime,1,10) = '2014-09-01'
1146 : Table 'teamleesin.g5_attendance' doesn't exist
error file : /gnu/plugin/attendance/attendance.php 입니다 동일증상이라 복붙한거였는데 실수였나보네요 해결할 수 있을까요? ㅠㅠ

다운 받으신 출석체크 플러그인 install.php 파일에 보시면 테이블 생성하는 쿼리가 있을거예요.. 
create table g5_attendance (
내용 ) 이런 식으로 되있는 부분이 있을겁니다.
만약 phpmyadmin 을 지원하는 호스팅 서비스를 이용 중이시라면 그걸 이용해서 테이블 생성하셔도 되구요. 아니라면...mysql테이블 생성으로 검색하시면 될 듯 합니다

감사합니다 덕분에 phamyadmin을 이용해 테이블을 생성하려고 합니다

거의다 온것 같은데 테이블생성에 오류가 나네요..ㅠㅠ

 " CREATE TABLE $p5[attendance_table] (
  id int(11) NOT NULL auto_increment,
  mb_id varchar(50) NOT NULL default '',
  subject varchar(255) NOT NULL default '',
  day int(11) NOT NULL default '0',
  reset int(11) NOT NULL default '0',
  point int(11) NOT NULL default '0',
  datetime datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (id),
  KEY id (mb_id,day,datetime)
) TYPE=MyISAM ";
sql_query($sql, false);

을 sql에 넣으니 오류가 나서 안되는데 혹시 제가 실수한 부분이 있을까요?

정확한 오류는

 
" CREATE TABLE $p5[attendance_table] (
  id int(11) NOT NULL auto_increment,
  mb_id varchar(50) NOT NULL default '',
  subject varchar(255) NOT NULL default '',
  day int(11) NOT NULL default '0',
  reset int(11) NOT NULL default '0',
  point int(11) NOT NULL default '0',
  datetime datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (id),
  KEY id (mb_id,day,datetime)
) TYPE=MyISAM ";


MySQL 메시지: 도움말

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '" CREATE TABLE $p5[attendance_table] (
  id int(11) NOT NULL auto_increment,
' at line 1
입니다

글을 늦게 봤네요. 어제 잠들어서..
CREATE TABLE $p5[attendance_table] (
  id int(11) NOT NULL auto_increment,
  mb_id varchar(50) NOT NULL default '',
  subject varchar(255) NOT NULL default '',
  day int(11) NOT NULL default '0',
  reset int(11) NOT NULL default '0',
  point int(11) NOT NULL default '0',
  datetime datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (id),
  KEY id (mb_id,day,datetime)
) TYPE=MyISAM ";  에서 테이블명이 $p5[attendance_table] 변수로 되어 있어서 나는 에러입니다.

$p5[attendance_table] => g5_attendance 로 바꾸시면 되요

install.php를 실행하여

g5_attendance이라는 테이블을 먼저 만드세요 

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

회원로그인

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