You are here: Re: dba_replace and inifiles « PHP Programming Language « IT news, forums, messages
Re: dba_replace and inifiles

Posted by Buzz Burrowes on 11/04/55 11:41

Interesting... I just tried to implement deleteing keys and I have the
same exact problem... a return of FALSE from dba_delete... even after an
previos check with dba_exists returns true for the same exact key.


Hmmmm. Any help would be greatly appreciated.

I guess I could move away from inifiles and use a flatfile database
instead... but I like the idea of being able to edit in ini file in a
text editor should I need to correct something or tweak something
without building a PHP script to do it.

Best,
Buzz


Buzz Burrowes wrote:

> I am using an inifile under the dba calls to store some info. Everything
> is working fine except dba_replace. It always fails. I am sure the key I
> am passing in exists. Here is some code...
>
> function ModifyAValue($group,$key,$index,$value,$db)
> {
> // $key_array = array($group, $key . $index);
> $key_array = "[" . $group . "]" . $key . $index;
> if(dba_exists($key_array,$db) == TRUE)
> {
> echo "KEY EXISTS!\n";
> }
> if(dba_replace($key_array,$value,$db)== FALSE) return FALSE;
> return TRUE;
> }
>
> When I execute the code above (with the key as either an array or a
> string) I DO get the KEY EXISTS echo... so the key is found, but the
> dba_replace always returns false. I couldn't find anything in the docs
> that said dba_replace doesn't work for inifiles.
>
> Anyone have any ideas?
>
> Thanks,
> Buzz
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация