help
От | Andy Arledge |
---|---|
Тема | help |
Дата | |
Msg-id | NDBBJNOEGLGKLPGMIGKPCEPKCBAA.mrgburg@worldnet.att.net обсуждение исходный текст |
Список | 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");.
Вложения
В списке pgsql-novice по дате отправления: