Post on 18-May-2015
description
transcript
Instalar PostgreSql y PHP
windows
Instaladores
• WAMP• PostreSql 8.4
wamp
1 2
1
For Frameworks PHP
For Postgresql
Verificar que estén activos sino hacer click y restart all services
Postgresql
admin
1
2
Index.php
<?php$conexion_bd = pg_connect("host=localhost
dbname=prueba user=postgres password=admin");
$consulta = 'SELECT * FROM categoria';$resultado = pg_query($consulta);while ($linea = pg_fetch_array($resultado, null,
PGSQL_ASSOC)) {echo $linea['id'].' '.$linea['nombre'].'<br/>';}
?>