note 65273 added to ref.pgsql

From: Date: Thu, 27 Apr 2006 22:47:52 +0000
Subject: note 65273 added to ref.pgsql
Groups: php.notes 
Request: Send a blank email to php-notes+get-109918@lists.php.net to get a copy of this message
Tengo un problema al tratar de conectar con las siguientes instrucciones: <?php // Conexion, seleccion de base de datos $conexion_bd = pg_connect("host=localhost dbname=prueba user=postgres password=root") or die('No pudo conectarse: ' . pg_last_error()); // Realizar una consulta SQL $consulta = 'SELECT * FROM autores'; $resultado = pg_query($consulta) or die('Consulta fallida: ' . pg_last_error()); // Impresion de resultados en HTML echo "<table>\n"; while ($linea = pg_fetch_array($resultado, null, PGSQL_ASSOC)) { echo "\t<tr>\n"; foreach ($linea as $valor_col) { echo "\t\t<td>$valor_col</td>\n"; } echo "\t</tr>\n"; } echo "</table>\n"; // Liberar conjunto de resultados pg_free_result($resultado); // Cerrar conexion pg_close($conexion_bd); ?> cuando lo ejecuto me arroja el siguiente error: Fatal error: Call to undefined function: pg_connect() in C:\AppServ\www\conpostgres.php on line 4 Si alguien me pudiera colaborar le agradeceria. ---- Server IP: 194.153.94.11 Probable Submitter: 64.76.81.56 ---- X-Spam-Status: No, hits=3.3 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER, HTML_MESSAGE autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/ref.pgsql.php Edit -- http://master.php.net/note/edit/65273 Del: integrated -- http://master.php.net/note/delete/65273/integrated Del: useless -- http://master.php.net/note/delete/65273/useless Del: bad code -- http://master.php.net/note/delete/65273/bad+code Del: spam -- http://master.php.net/note/delete/65273/spam Del: non-english -- http://master.php.net/note/delete/65273/non-english Del: in docs -- http://master.php.net/note/delete/65273/in+docs Del: other reasons-- http://master.php.net/note/delete/65273 Reject -- http://master.php.net/note/reject/65273 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#109918) next »