[ MySQL ]

1. MySQL 사용자 계정 생성하기

::  user 테이블에 사용자 계정 생성

--> 'host', 'username', 'password', :: 나머지 칼럼에는 기본값인 N을 삽입하여 mysql 데이터베이스에 대한 권한을 사용자가 가지지 않도록 한다.

--> flush privileges 하여 신규계정을 적용한다.

--> db 테이블에 사용자에 대한 데이터베이스 권한 삽입은 , host, db, user 컬럼이외에는 Y를 삽입하여

이 사용자가 관리하는 <데이터베이스>에 한하여 모든 권한을 부여한다.



          [ 게시판 구성원리 ]


<pre>
1. 게시판 page 나누기

    $listnum :: 한페이지에 보여줄 글수,내가 임으로 정함
                (10개)

    $page ::  현재페이지 -- 페이지 번호
              (보고있는 ,원하는 페이지)

    $page_num :: 한 블록당 페이지 건수
                 (임으로 내가 정함,10개)

    $total_no :: 저장된 총 글수

    $total_page ::  총 페이지수
                    = ceil($total_no/$listnum)

    $total_block :: 전체 블록수
                    = ceil($total_page/$page_num)

    $block :: 현재 페이지($page)가 포함된 블록번호
               = ceil($page/$page_num)

    $first :: 현재 블록의 시작 페이지 번호
              ($block-1) * $page_num

    $last :: 현재 블록의 마지막 페이지 번호
                $block * $page_num

    $start :: 그 페이지에서 출력할 처음 글번호
              = $listnum * ($page - 1)

    $pagestart :: 처음 페이지 이동

    $pageend :: 마지막 페이지 (= $total_page)

    ---------------------------------------------------

    $rtotal :: 읽어온 총글수

    $prevpage :: $page - 1 이전페이지
    $nextpage :: $page + 1 다음페이지

 

 

네이버에서 검색해보자

flexicart -- ?? 오픈소스 코드이그나이터 , 이용가능한 소스인것 같다.

 

------------

쇼핑몰 로직 구현 참고 블로그  , 좋은 사이트인거 같네

http://taranakite.blog.me/100152327611

 

 

 

======================

 

'php' 카테고리의 다른 글

게시판 만들기 파트 1  (0) 2013.04.05
방명록 기초 로직 연습  (0) 2013.04.02
php 5.4에서 변수명 에러날때 해결방법  (0) 2013.03.26
php 에러 $_GET , $_POST 변수 문제  (0) 2013.03.22



 --- [ 방명록 만들기 ] ---


1. 방명록 구조

글저장 -- 글 목록 / 글 쓰기 -- 글 삭제

insert.php -- list.php --         delete.php


--->  MVC 패턴에 따라 방명록 구조를 변경하려면 어떻게 해야할까 ?

        한빛출판사의 [ 뇌를 자극하는 PHP 프로그래밍 ] 조명진(저) 책을 참고하여

        Codeigniter로 만들어 보자 ...



게시판에서 가입파일, 운영자에게 메일 보내기
에러날때(php)

에러 메시지 ::

Notice: Undefined index: cmd in C:\BitNami\wampstack-5.4.13-0\apache2\www\sub\contact.html on line 15

해결방법 :: 다음 코드를 쳐서 변수명을 검사하면 에러가 사라짐...

if(empty($_GET["cmd"])) {
    $_GET["cmd"] = NULL;
}

,그다음엔 소스에서 그 변수를 쓰면 에러 안난다....

if($_GET["cmd"]=="catman"){
    $send_email    = $_POST["send_email"];        //보낸사람 주소
    $send_name    = $_POST["send_name"];        //보낸사람 이름
    $dest_email        = $_POST["dest_email"];        //받는사람 주소
    $mail_subject    = $_POST["mail_subject"];        //메일 제목
    $mail_content    = $_POST["mail_content"];    //메일 내용

............

'php' 카테고리의 다른 글

게시판 만들기 파트 1  (0) 2013.04.05
코드이그나이터 기반 쇼핑몰 개발 정보  (0) 2013.04.03
방명록 기초 로직 연습  (0) 2013.04.02
php 에러 $_GET , $_POST 변수 문제  (0) 2013.03.22

_________________________________________________________________________

 

계속 지우 보드에서 , $_GET 변수 에러가 남 

우선 해결은 임시로 함....

내 컴퓨터 에러 메시지

--->    Notice: Undefined index: last_secret_view in

          C:\BitNami\wampstack-5.4.13-0\apache2\www\zb\list.php on line 475

해결 :: 

---> 다음 블로그 에서 참고함....

http://blog.naver.com/hhangky?Redirect=Log&logNo=20091272024


WHEN using $_POST or $_GET 사용할때 에러날 경우

Notice : Undefined index 'fields of the table' in 'path of php file being execute'

on line 'current line'

---> to avoid this error, simply test whether the fields of the table was initialized with

the function isset()


// Before using $_POST['value']

if (isset($_POST['value']))

{

     ///  Instructions  if $_POST['value']  exist

}

This type of error is notified depending on the configuration of the server

it is not notified by default as it  is considered as a minor error,

corresponding to the constant   E_NOTICE

YOU can change the types of errors reported with the error_reporting function




-------------------------------------------------------------------------------------------------





+ Recent posts