Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- session_start();
- $cn = pg_connect("host=localhost port=5432 dbname=james user=james password=james");
- if(!$cn)
- {
- die('failed to connect to database');
- }
- $sql = 'SELECT * from xuser';
- $res = pg_query($cn,$sql);
- echo '<pre>';
- while ($row=pg_fetch_row($res)){
- echo $row[0].' '.$row[1].' '.$row[2]."\n";
- }
- echo '</pre>';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement