
February 6th, 2004, 02:59 PM
|
|
|
|
Join Date: Apr 2007
Posts: 3
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Using Sessions in Oracle
I am using php 4.1 that is run on redhat 9. I am using Oracle 9i.
Here is the question. I am trying to maintain a user session in an oracle database. I am experiencing some problems with storing the session ID in the database. For one reason or another The session ID will not bind properly.
php Code:
Original
- php Code |
|
|
|
function UserLogon($db, $username) { $errorMsg = ""; $stmt = @ OCIParse($db, "insert into SAPNET_WEBSITE.SAPNET_SESSIONS (WEB_SESSIONS_ID, USERNAME, IP_ADDRESS) values (:session, :userName, :ipaddr)"); //$stmt = @OCIParse($db,"insert into SAPNET_WEBSITE.SAPNET_SESSIONS (IP_ADDRESS, USERNAME) values (:ipaddr, :userName)"); if (!$stmt) $errorMsg = GetDBError($db); else { $ID=$sessionID; $ipAddress = GetRemoteIP(); $errorMsg = GetDBError($stmt); } return $errorMsg; }
Is there are specific way to set up the table that I don't know about. Ummm... The table info is
SAPNET_SESSIONS table
WEB_SESSIONS_ID char(32)
IP_ADDRESS varchar(24)
USERNAME varchar(20)
Any Info would be great.
Thanks
|