note 22880 deleted from function.pg-field-size by cece
| From: | cece@php.net | Date: | Tue, 01 Feb 2005 14:33:27 +0000 |
| Subject: | note 22880 deleted from function.pg-field-size by cece | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-84326@lists.php.net to get a copy of this message | ||
Note Submitter: alex at linuxNOSPAM dot org dot pe
Reason: useless
----
Ok, surfing on the web, i see some code that help me
<?php
$coneccion=pg_connect("host=localhost port=5432 dbname=pruxia");
if ($coneccion){
echo "Base de Datos Activa!!!<br>";
}
if (!$coneccion)
{
echo "Base de Datos con problemas!!!";
}
$nombredb = pg_dbname ($coneccion);
echo "Nombre de la base de datos: $nombredb <br>";
$res = pg_exec("SELECT * FROM factura ");
echo "$res <br>";
$row = pg_numrows($res);
echo("Number of Rows = $row <br>");
$campos = pg_numfields($res);
echo("Number of Fields = $campos <br>");
echo(" <br>");
for ($i = 0; $i <= $campos - 1; $i++) {
$campo = pg_fieldname($res,$i);
echo("Name of the Column = $campo <br>");
$tcampo = pg_fieldtype($res,$i);
echo("Tipo de campo = $tcampo <br>");
$scampo = pg_fieldsize($res,$i);
echo("Tamaño de campo = $scampo <br>");
echo(" <br>");
}