Skip site navigation (1) Skip section navigation (2)

pg_exec : problem

From: "Andy Arledge" <mrgburg(at)worldnet(dot)att(dot)net>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: pg_exec : problem
Date: 2001-01-23 01:29:05
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
can someone please give me an idea why the 3rd pg_exec won't retrieve the
info from the table.
$link, $t, $userzip, $foundzip - are all global variables, the 1st two
pg_exec's work great. 

thanks in advance,

Andy Arledge
$link = pg_connect("host=localhost dbname=nsingles user=purcell");
    DisplayErrMsg(sprintf("Error connecting to host %s, by user %s",
$hostname, $username));

if(!($result= pg_exec($link, "SELECT * from info1 where username='$to';")))
DisplayErrMsg(sprintf("Error in executing line %s stmt", $selectStmt));

// get users zip;
	if(!($result2= pg_exec($link, "SELECT * from signup where
   		DisplayErrMsg(sprintf("Error in executing line %s stmt",
 	$t = @pg_fetch_object($result2, 0);
 	$userzip = $t->zipcode;
// get results zip;
	if(!($result3= pg_exec($link, "SELECT * from signup where
   		DisplayErrMsg(sprintf("Error in executing line %s stmt",
	$t = @pg_fetch_object($result3, 0);
 	$foundzip = $t->zipcode;

Attachment: winmail.dat
Description: application/ms-tnef (2.0 KB)

pgsql-novice by date

Next:From: Leandro FanzoneDate: 2001-01-23 13:50:17
Subject: Data directory destroyed
Previous:From: Tom LaneDate: 2001-01-22 22:00:56
Subject: Re: Inserting TEXT with multiple lines

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group