PHP error parsing SQL string containing assoc. array

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: PHP error parsing SQL string containing assoc. array
Groups: php.general 
Request: Send a blank email to php-general+get-45372@lists.php.net to get a copy of this message
I'm trying to write a sql statement (for Oracle) that uses an associative array element as a dynamic value. PHP is choking on this line: $sql = "insert into sessions(session_id, user_id, session_expiration) values ('$sess_id', $user_fields['USER_ID'], sysdate + ($user_fields['MINS_TILL_EXPIRE'] * 1/1440))" I get this error back from PHP: Parse error: parse error, expecting T_STRING' or T_VARIABLE' or `T_NUM_STRING' Can I not use my associative array like this? -- Michael Champagne, Software Engineer Capital Institutional Services, Inc. wk: mchampagne@capis.com hm: mchamp@texas.net ****************************************************************** This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction, unless specifically agreed otherwise. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect the views or opinions of Capital Institutional Services, Inc. Capital Institutional Services, Inc. accepts no liability for any errors or omissions arising as a result of transmission. Use of this communication by other than intended recipients is prohibited. ******************************************************************

« previous php.general (#45372) next »