Re: [personal] HTML to access a database
От | Bruno LEVEQUE |
---|---|
Тема | Re: [personal] HTML to access a database |
Дата | |
Msg-id | 3F93D10C.3000208@net6d.com обсуждение исходный текст |
Ответ на | Re: [personal] HTML to access a database (papapep <papapep@gmx.net>) |
Список | pgsql-novice |
Here is an example of php and postgres Sorry there is code before and after : [...] $conn=pg_connect("host=localhost user=USER dbname=DB"); if (!$conn) { echo "An error occurs.<BR>"; exit; } $query="SET DATESTYLE TO PostgreSQL,European"; # execution of a query pg_query($conn, $query); $query="SELECT * from agenda where date = '" . $MaDate . "'"; $result = pg_query($conn, $query) if (!$result) { echo "An error occurs. - " . $cas . " + " . $UneDate . " + " . $Donnees[0] . ":0:0<BR>"; exit; } foreach (pg_fetch_all($result) as $value) { $libDest = "Text " . $value[NAMEOFCOL1]; $libSrc = "TExt $value[NAMEOFCOL2]"; } [...] With this you take a minimum of knowledge of php/postgres Bruno papapep wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Evan Panagiotopoulos wrote: > | I created a database with a table and I am interested to learn how to > | access it from a web page. Since I am a novice I would like to see an > | example or two of that. > > How about taking a look at the phppgadmin code? I think it should be > helpfull for you. > > Josep Sànchez > [papapep] > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.1 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQE/k74z2vx52x0kyz4RAkX6AJwLYsW8snkq/seV6e9nyoV7mc2CVgCfeELA > E0OdH1PUDz1OA7eHEC1nJ+E= > =9Bpa > -----END PGP SIGNATURE----- > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster > -- Bruno LEVEQUE System Engineer SARL NET6D bruno.leveque@net6d.com http://www.net6d.com
В списке pgsql-novice по дате отправления: