help

From: "Andy Arledge" <mrgburg(at)worldnet(dot)att(dot)net>
To: "Pgsql-Novice(at)Postgresql(dot) Org" <pgsql-novice(at)postgresql(dot)org>
Subject: help
Date: 2001-01-19 05:27:33
Message-ID: NDBBJNOEGLGKLPGMIGKPCEPKCBAA.mrgburg@worldnet.att.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

i have $uname and $username defined as global variables. in the select
statement where gender='$gender' everything works fine. but immediately
afterward i call pg_exec again and aparently i lose $uname. $uname is the
same as $username and both are null, but at the beginning both are
intialized and contain the correct variable.

printf(zcode2) returns - zcode2 : Resource id #4. which i can't find
anywhere.
working straight from a command prompt select works fine when i give it a
name to lookup.

any help would be most appreciated. thanks in advance,

andy arledge

$link = pg_connect("host=localhost dbname=nsingles user=purcell");
if(!($link)){
DisplayErrMsg(sprintf("Error connecting to host %s, by user
%s", $hostname, $username));
exit();
}

if(!($result= pg_exec($link, "SELECT * from info1 where
gender='$gender';")))
{
DisplayErrMsg(sprintf("Error in executing line %s stmt",
$selectStmt));
//exit();
}
if(!($zcode2= pg_exec($link, "SELECT * from signup where
username='$uname';")))
{
DisplayErrMsg(sprintf("Error in executing line %s stmt",
$selectStmt));
exit();
}
$row2 = @pg_fetch_object($zcode2);
$zipcode2 = $row2->zipcode;
printf("<HR>zipcode : zipcode");
printf("<HR>zipcode2 : $zipcode2");
printf("<HR>zcode2 : $zcode2");
printf("<HR>uname : $uname");
printf("<HR>username : $username");.

Attachment Content-Type Size
winmail.dat application/ms-tnef 2.2 KB

Browse pgsql-novice by date

  From Date Subject
Next Message Rasputin 2001-01-19 11:30:49 Re:
Previous Message ashley 2001-01-19 04:46:08 Front End