A few questions:

From: Date: Wed, 17 Oct 2001 08:10:34 +0000
Subject: A few questions:
Groups: php.db 
Request: Send a blank email to php-db+get-13415@lists.php.net to get a copy of this message
1: when making a session (session_start() ) is it possible that pages don't expire so very fast? I want to set that expiration to about half an hour... so people can use their <- back button... 2: When I let a user log on, I want them to show some buttons. They log on IN the database (they are real database users. Database being postgreSQL) okay... log on with username 'user1' And the password is okies... We want to see which groups this user is member off: $result = pg_exec($dbase, "SELECT usesysid FROM pg_user WHERE usename ='user1'"); $data = pg_fetch_object($result,0); $finalresult = pg_exec($dbase,"SELECT * FROM pg_group WHERE grolist[] ='$data->usesysid'"); But it tells me I have to put something between the square braces ([ ]) so that is not working :( A possible option would be: $userresult = pg_exec($dbase,"SELECT * FROM pg_user"); $usernum = pg_numrows($userresult); for($i=1;$i<=$usernum;$i++) { $finalresult = pg_exec($dbase,"SELECT * FROM pg_group WHERE grolist [$i]='$data->usesysid'"); } But I find that an ugly one... anyone who can help me sort out how to do it as it is supposed? neatly and such? :) by the by: I want to know how to best get something from that array grolist [?], uhm.. that is: everything :P that the last for(...) needs to do a bit more with $finalresult, I am aware of... but I want my first $finalresult to work! *whines* Friendly Greetings, Michiel Lange ActuEra B.V.

« previous php.db (#13415) next »