database.sarang.net
UserID
Passwd
Database
DBMS
MySQL
ㆍPostgreSQL
Firebird
Oracle
Informix
Sybase
MS-SQL
DB2
Cache
CUBRID
LDAP
ALTIBASE
Tibero
DB 문서들
스터디
Community
공지사항
자유게시판
구인|구직
DSN 갤러리
도움주신분들
Admin
운영게시판
최근게시물
PostgreSQL Q&A 251 게시물 읽기
No. 251
Re:게시판= webdb 실패->다른 source로 성공
작성자
신철용
작성일
1999-12-08 20:24
조회수
18,791

협조에 감사드립니다. 저도 않될리가 없다고 생각했는데,

하지만 안되던군요.. 하는수 없이

다른 형태로 연결에 성공하여서 보여드립니다.

1.connection.php3의 내용입니다.

<?php

$connection = pg_connect("dbname=guest_pg user=nobody port=5432")

or die ("데이타서버에 접속할수 없습니다.");

?>

2.index.html의 내용입니다. http://localhost 접속시 바로 보기위하여 설정함.

<HTML>

<HEAD><TITLE>Window name</TITLE></HEAD>

<BODY>

<br><p><CENTER><h1>Title</h1></CENTER>

<br><p>

<? include("connection.php3"); ?>

 

<?

$que1 ="select id,comment,name,email,ip from guestbook order by id DESC " ;

$result = pg_exec($connection, $que1);

$total = pg_NumRows($result);

?>

<table border=1>

<tr><th>ip</th><th>name</th><th>email</th><th>comment</th></tr>

<? $i=0 ;?>

<? while ($i<$total) :?>

<tr>

<td><? echo pg_Result($result,$i,"ip") ;?></td>

<td><? echo pg_Result($result,$i,"name") ;?></td>

<td><? echo pg_Result($result,$i,"email") ;?></td>

<td width='541'><? echo pg_Result($result,$i,"comment") ;?></td>

</tr>

<? $i++ ;?>

<? endwhile ;?>

</table>

</body>

</html>

간단히 이렇게 함으로 화면에 보여집니다.

물론 오류도 있지만..

[Top]
No.
제목
작성자
작성일
조회
242게시판 설치법: 소스를 풀 디렉토리를 알려 주세요.
전계백
1999-12-07
19656
243┕>Re: 게시판 설치법: 소스를 풀 디렉토리를 알려 주세요.
정재익
1999-12-07 02:06:40
21044
238내용에 ' 사용할려믄?
장위식
1999-12-06
20836
239┕>Re: 내용에 ' 사용할려믄?
정재익
1999-12-06 18:20:23
20729
233조언 부탁드립니다
장위식
1999-12-05
20075
234┕>Re: 조언 부탁드립니다
정재익
1999-12-05 16:04:11
20346
236┕>Re: 조언 부탁드립니다
한상인
1999-12-06 14:32:33
20448
229게시판= webdb 실패 User authentication fialed
신철용
1999-12-04
18463
232┕>Re: 게시판= webdb 실패 User authentication fialed
정재익
1999-12-04 15:55:12
19220
240 ┕>Re: Re: 게시판= webdb 실패 User authentication fialed
신철용
1999-12-06 20:48:30
19384
241  ┕>Re: Re: Re: 게시판= webdb 실패 User authentication fialed
정재익
1999-12-06 23:26:24
18951
244   ┕>Re: 게시판= webdb 실패 User authentication fialed
신철용
1999-12-07 09:17:19
19202
249    ┕>Re: Re: 게시판= webdb 실패 User authentication fialed
정재익
1999-12-07 17:35:40
19066
251     ┕>Re:게시판= webdb 실패-&gt;다른 source로 성공
신철용
1999-12-08 20:24:17
18791
254      ┕>Re: Re:게시판= webdb 실패-&gt;다른 source로 성공
정재익
1999-12-09 08:58:19
18866
226문제의 order by..........
김종혁
1999-12-03
18721
227┕>Re: 문제의 order by..........
이정환
1999-12-04 01:03:15
18730
228 ┕>Re: Re: 문제의 order by..........
김종혁
1999-12-04 01:55:24
18950
231  ┕>Re: Re: Re: 문제의 order by..........
이정환
1999-12-04 12:23:38
19294
235┕>Re: 문제의 order by..........
정재익
1999-12-05 19:27:20
19679
225DB가 자꾸 죽어요... Postgres 왕초보... ㅠㅠ
이정호
1999-12-03
18913
230┕>Re: DB가 자꾸 죽어요... Postgres 왕초보... ㅠㅠ
엠브리오
1999-12-04 12:22:57
19537
223재익님, 답변 고맙심다.. 그런데..
maabus
1999-12-03
17744
224┕>Re: 재익님, 답변 고맙심다.. 그런데..
정재익
1999-12-03 14:46:04
18833
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2023 DSN, All rights reserved.
작업시간: 0.053초, 이곳 서비스는
	PostgreSQL v16.1로 자료를 관리합니다