File "info.php"
Full path: /www/nakagusuku/wpos/output/info.php
File size: 650 B
MIME-type: text/x-php
Charset: utf-8
<?php
try
{
$conn = pg_connect("
host = 192.168.100.153
dbname = cnbs
user = postgres
password= am#71ZJ*
");
if (!$conn)
throw new Exception("データベースへの接続に失敗");
$selectWname = "SELECT dispno, tagid, wname FROM nakagusuku.worker_info WHERE useflg='true' ORDER BY dispno;";
$res = pg_query($conn, $selectWname);
$rowcnt = pg_num_rows($res);
for($i = 0; $i < $rowcnt; $i++)
{
$row = pg_fetch_assoc($res, $i);
$dispno = $row["dispno"];
$tagid = $row["tagid"];
$wname = $row["wname"];
if ($i > 0)
print "#";
print $dispno. ",". $tagid. ",". $wname;
}
}
catch(Exception $exc)
{
}
pg_close($conn);
?>