<? $v_dbname = ""; //データベースの名前を変数へ代入 $v_user = ""; //ユーザー名を変数へ代入 $v_password = ""; //パスワードを変数へ代入 $viewname="v_goodsm"; //表示したいテーブルの名前 ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS"> <title>View内容</title> </head> <body> <div align="center"> <table width="350" border="0" bgcolor="#009999"> <tr> <td height="12"> <div align="center"><b><font color="#FFFFFF">View内容</font></b></div> </td> </tr> </table> <br> <div align="center"> <b>View名:<? print $viewname ?></b> <table width="500" border="0" cellspacing="2" cellpadding="2" align="center"> <tr bgcolor="#113333" height="20"> <td> <div align="center"><b><font color="#FFFFFF">内容</font></b></div> </td> </tr> <? // Connect to DB if (@pg_connect("dbname=$v_dbname user=$v_user password=$v_password") == false) { print("unable to connect to database."); exit; } pg_exec("SET CLIENT_ENCODING = 'SJIS'"); $sql = "select definition from pg_views where viewname='$viewname';"; @$result = pg_exec($sql); if ($result == false) { printf("failed to exec SQL:¥"$sql¥""); exit; } $rows = pg_numrows($result); for ($i = 0; $i < $rows; $i++) { $definition = pg_result($result, $i, "definition"); print ("<tr bgcolor=¥"#99CCCC¥">"); print ("¥n"); print ("<td>$definition</td>"); print ("¥n"); print ("</tr>¥n"); } pg_close(); ?> </table> </div> </body> </html>
(Last Update 2002/07/07)