[phorm] [Phorm:] Re: Alert 010 - Unable to open DB variables file

  • From: webbbs@xxxxxxxxx
  • To: support@xxxxxxxxx
  • Date: 23 May 2003 00:33:56 -0000

The following new message has been posted on Phorm Support Forum at 
<http://www.phorm.com/support/>. 

*************************************************************************** 

  MESSAGE:  (#2728) Re: Alert 010 - Unable to open DB variables file 
            <http://www.phorm.com/support/?rev=2728> 
  AUTHOR:   Patrick O'Hara 
  DATE:     May 22, 2003 at 8:33 p.m. EST 

  Reply To: (#2725) Re: Alert 010 - Unable to open DB variables file 
  Author:   Caleb Shiffer 
  Date:     May 22, 2003 at 7:26 p.m. EST 

> I really appreciate all your help :) 

No worries. Thank you. 

> I'm assuming it has something to do with 
> the "%" I used in those entries. 

Yes it is. If you want to add the % sign, you'll need to add the following to 
the config file so that the % sign is in the variable before trying to log to 
the database. 

$trade = $trade . "%"; 

At the moment, you have lots an lots of check boxes, and instead of putting 
them all into individual columns in the database you want to put all the haves 
in one and all the needs in another? If so, this is how I would start off... 

$have_col = ""; 
$need_col = ""; 
if (is_array($HTTP_POST_VARS)) { 
-- while (list($temp_key, $temp_value) = each($HTTP_POST_VARS)) 
---- if ($temp_value == "ON") { 
------ if (ereg("^have_", $temp_key)) 
-------- $have_col .= "$temp_key,"; 
------ if (ereg("^need_", $temp_key)) 
-------- $need_col .= "$temp_key,"; 
---- } 
-- } 
-- substr_replace($have_col, "", -1); 
-- substr_replace($need_col, "", -1); 
} 

Cycles through all variables, if they have a value of ON and have a prefix of 
have_ or need_ then the name of the field is added to a comma separated list. 
The substr_repalce just knocks off the last comma. 

Hope this helps, 

Regards, 

Patrick O'Hara 
WhitsundayIT 
QLD, Australia 

patrick@xxxxxxxxxxxxxxxx 
www.whitsundayit.com 

P.S. you'll need to test the code above and tweek it if needed. 

*************************************************************************** 

This is an automatically-generated notice.  If you'd like to be removed from 
the mailing list, please visit Phorm Support Forum at 
<http://www.phorm.com/support/>, or send your request to webbbs@xxxxxxxxxx  If 
you wish to respond to this message, please post your response directly to the 
board.  Thank you! 
-------------------------------------------------
You are receiving this message because you are subscribed to the Phorm mailing 
list. To send messages to the mailing list, simply send email to 
phorm@xxxxxxxxxxxxx from the address you have subscribed. You may unsubscribe 
from the list by sending email to phorm-request@xxxxxxxxxxxxx with 
'unsubscribe' in the SUBJECT field.

Other related posts: