Re: deprecation of useful functions

2009-02-16 Thread haj

More detailed explanation and examples in the API doc would be
seriously helpful especially to newer users.

I wish it had comment section like PHP doc site.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: 3 ajax selects

2008-11-25 Thread haj

The basisc select A -> select B part is pretty much like:

http://www.devmoz.com/blog/2007/04/04/cakephp-update-a-select-box-using-ajax/


My question is if anyone tried to do select A both controls select B
and C at a time.

In my project I'm resorting to hide select C via Javascript when
select A is changed, not a good-looking work-around.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



3 ajax selects

2008-11-23 Thread haj

Ok, another attempt to pull some wisdom.

observeField is so great, it makes ajax 'just works.'

Select A changes the content of select B on the fly beautifully, until
I have to add select C. So, select A changes select B, then select B
changes select C is no problem, it's no different from select A
changes select B.

Now, after select B changed select C, if I now change select A again,
I need to reset not only select B but also select C. I have no idea
how I can 'reset' select C via observeField.

Is there any simple way to do this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



multiple fields for observeField

2008-11-17 Thread haj

Hello,

I'm trying to build 3 dependant ajax select boxes with observeField.
So, select A, select B, and select C.

I'm almost successful to do A changes B, B changes C is almost fine
with 2 observeFields for A and B.

Now I need to add condition so A changes C, or A changes both B and C.

I tried setting 'update'=>array('B','C') for observeField for A but
when I supply array() for 'update,' no longer any select would do
ajax. Then I tried to put another observeField which observes the same
field but with different option array, this partially works but it
sometimes works strangely... looks like instead of using layout for
the spefied method (for B, C), gets completely un-related view and
using it.

I'm not sure why this is happening but I don't know what's the best
way to do in the first place.  So my question is either how I can
change two selects at a time or, what I'm wrong about using two
observeField pointing the same target.


By the way, this ajax select part is in the middle of big complex form
so I'm not using $ajax->form but using regular $form->create.

I searched for the net for a couple of hours but found no direct
answer to my question so far... Can someone shed light?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: nested condition

2008-08-31 Thread haj

yeah, i figured out that later. Only, "NOT sth IN ('a', 'b')" was
kinda unnatural to me in the mind of SQL,  i was used to "sth NOT
IN('a','b')" way.


On Aug 30, 9:11 pm, Rafael Bandeira aka rafaelbandeira3
<[EMAIL PROTECTED]> wrote:
> > Only, unfortunately, I found out cake can't yeild expression like:
>
> > sth NOT IN('a','b')
>
> Yes it can, use
>
> 'not' => array('sth' => array('a', 'b'))
> 
> And you could write those conditions like this
>
> > 'conditions'=>array(
> >   array( 'or' => array(
> >       array('Report.user_id' => $user_id),
> >      array('Report.user_id2' => $user_id)
> >  )),
> >  array('or'=>array(
> >           array('Report.del_flg' => 0),
> >           array('Report.status <>' => array('6s', '6r'))
> >  ))
> > )
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: SQL: where column NOT IN ...

2008-08-23 Thread haj



On Aug 22, 10:28 pm, Mariano Iglesias <[EMAIL PROTECTED]>
wrote:
> 'not' => array('Model.field' => array( 1, 2, ...))

That's what I meant; you have to express in that way instead of
somehow accustomed typical SQL way.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: SQL: where column NOT IN ...

2008-08-22 Thread haj

It's just current implementation doesn't take 'NOT' keyword with the
use of IN() for array, i guess, and yields the same result anyway...

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: SQL: where column NOT IN ...

2008-08-21 Thread haj

Yeah, I always wrote in SQL like:

`id` NOT IN(1,2,3)

but:

NOT `id` IN(1,2,3)

oh well.


On Aug 21, 5:19 pm, teknoid <[EMAIL PROTECTED]> wrote:
> NOT IN is possible, but your syntax is not correct...
>
> See the "NOT" array:http://book.cakephp.org/view/74/complex-find-conditions
>
> On Aug 21, 4:08 pm, starkey <[EMAIL PROTECTED]> wrote:
>
> > Hello all,
>
> > I searched for this without success.  I'm using 1.2 RC2 and I need to
> > run a query like this:
> > $this->execute('delete from table where column not in (1,2,3)');
> > OR
> > $this->deleteAll(array('id'=>'NOT IN (1,2,3)'),false, false);
>
> > The problem is that the execute() returns 'unhandled'.  I traced the
> > code and obviously nate,gwoo, and the gang are far better coders than
> > I because I couldn't figure out why I am getting 'unhandled' back.
>
> > Can someone help me with this, please?
>
> > Related, I am also wondering if it is possible to do something like
> > this (although I haven't tried):
> > $this->find('all',array('conditions'=>array('id'=>'NOT IN (1,2,3)')));
>
> > Thank you!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: isUnique model validation 'on create' not working?

2008-08-18 Thread haj

I know I'm not answering to the question but a field that needs to be
unique generally hold the same requirement on an edit?
For the real answer, it's working here. Sorry for not helping..
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: redirect and header error but no white space

2008-07-17 Thread haj

I'm using this editor on windows:

http://www.emeditor.com/

There is a checkbox in config menu if to add BOM or not for UTF-8.
Some editor may not have this feature.


On Jul 16, 1:07 pm, Stinkbug <[EMAIL PROTECTED]> wrote:
> Excuse my stupidity on this topic, but I don't really understand
> encoding at all.  So how exactly do I save a a file without the BOM?
>
> Does it require special software, or what?  I'm on windows.
>
> On Jul 14, 11:39 pm, haj <[EMAIL PROTECTED]> wrote:
>
> > So, I basically saved all UTF-8 files without BOM and now things works
> > beautifully.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: redirect and header error but no white space

2008-07-14 Thread haj

So, I basically saved all UTF-8 files without BOM and now things works
beautifully.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: redirect and header error but no white space

2008-07-14 Thread haj

Ok, it looks like this php bug is involved. I have been ignorant about
this totally..

http://bugs.php.net/bug.php?id=22108
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: redirect and header error but no white space

2008-07-14 Thread haj

Well, I might find a light in some direction... the model file was
written and saved in UTF-8 (all else are UTF-8, too, tho) but when I
change this to not UTF-8, it looks working... I feel this very
hairly...

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: redirect and header error but no white space

2008-07-14 Thread haj

Darn, I can't locate what's wrong!

Although I was mostly certain about not having extra space or funky
control code hidden somewhere in the code, I just copied 1.2 RC2 to a
new directory and set up only 3 files for the test - model/controller/
view. And they're like this:

article.php (model):


article_controller.php (controller):
redirect('/articles/index');
}
function index() {
}
}?>

index.ctp (view):
link('GO', '/articles/go'); ?>


Then clicking "GO" from  /articles page still gives me:

Warning (2): Cannot modify header information - headers already sent
by (output started at C:\Program Files\Apache Group\Apache2\htdocs
\caketest\app\controllers\articles_controller.php:1) [CORE\cake\libs
\controller\controller.php, line 577]


Damn, I feel very stupid, I've never had this problem with various 1.1
productions (using lots of redirect) in the last years. There can be
no since white space before or after or ctr code etc since I'm setting
my editor any ctr char visible. I may yet somehow stupid in this less
than 10 lines of total code but do feel something ELSE is the problem.
I'm hosting this on local XP with Apache2.0.59/PHP4.3.4, MySQL4.0.20
if this info helps anything.

Could someone suggest me how I could perhaps locate WHERE this damn
header must have been sent?!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: redirect and header error but no white space

2008-07-10 Thread haj

Thanks for your reply.

It doesn't look like end of file for I usually make return code etc
visible on my editor but I should check again anyways. Yes, I'm
running it on the XP, and basically all files are UTF-8...

If anything I'm missing people could think of, I'd appreciate any
input.


On Jul 10, 11:24 pm, lucaspirola <[EMAIL PROTECTED]> wrote:
> i re-create all structure and works fine,
>
> maybe its something wih end of file or encoding of file,
> or windows :S
>
> any other news i post here
>
> see ya!
>
> On Jul 10, 11:28 pm, lucaspirola <[EMAIL PROTECTED]> wrote:
>
> > wow,
> > i got the same problem,
> > and that surprise because app
> > was fine...
>
> > any news about this problem?
>
> > thks!
>
> > On Jul 8, 11:00 pm, haj <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
>
> > > Using 1.2 and I'm doing a simple model saving page then $this-
>
> > > >redirect(), I get the header error telling:
>
> > > Warning (2): Cannot modify header information - headers already sent
> > > by (output started at C:\Program Files\Apache Group\Apache2\htdocs\eco
> > > \app\controllers\shippers_controller.php:1) [CORE\cake\libs\controller
> > > \controller.php,line577]
>
> > > Searched the group and found info about spaces, I checked any extra
> > > white space in the beginning or ending of shippers_controller.php or
> > > related model files, find nothing. In my editor I can visual control
> > > code so it's not there. I also tried to remove the last ?> from
> > > shippers_controller.php file but same error remain.
>
> > > Any idea?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



redirect and header error but no white space

2008-07-08 Thread haj

Hi,

Using 1.2 and I'm doing a simple model saving page then $this-
>redirect(), I get the header error telling:

Warning (2): Cannot modify header information - headers already sent
by (output started at C:\Program Files\Apache Group\Apache2\htdocs\eco
\app\controllers\shippers_controller.php:1) [CORE\cake\libs\controller
\controller.php, line 577]


Searched the group and found info about spaces, I checked any extra
white space in the beginning or ending of shippers_controller.php or
related model files, find nothing. In my editor I can visual control
code so it's not there. I also tried to remove the last ?> from
shippers_controller.php file but same error remain.

Any idea?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CLI access hampered by session?

2007-09-16 Thread haj

Session wasn't loaded indeed! The server I'm working on now has a
custom installation of php which compiled without cli support and thus
I had to compile it myself, but because I couldn't "uninstall"
previous one... caused me confusion on which executable is the one I
should be linking...

Now I found a php-cli executable which does load session but then it's
giving me other errors :-( They may relate to cake but before there's
an obvious error which is definitely about php itself and I gotta fix
this first..

Thanks for giving me a light!

On Sep 16, 6:16 am, "Christian Winther" <[EMAIL PROTECTED]> wrote:
> Perhaps you have a php-cli.ini and a php.ini file in your configuration
> directory of php?
>
> That is a pretty wellknown way to do it, have a cli config without session
> and other irrelevant components for web, and then a main for web.
>
> Try to - if possible - to execute this command on your command line:
>
> php -m and check if session is loaded
> php -i and check if the is a different ini path
>
> /Jippi
>
> -Original Message-
> From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
>
> Of haj
> Sent: 16. september 2007 11:50
> To: Cake PHP
> Subject: CLI access hampered by session?
>
> Hi,
>
> I've been trying to call a controller via CLI. I basically followed
> this Bakery tutorial:
>
> http://bakery.cakephp.org/articles/view/calling-controller-actions-fr...
> -and-the-command-line
>
> so, copied index.php and change it to take command line args. Then
> upon calling an action via ssh, I get error like:
>
> PHP Fatal error:  Call to undefined function: session_cache_limiter()
> in /var/www/html/cake/libs/session.php on line 153
>
> The session itself must be working since I'm using session to track
> user login in regular (not CLI) web access pages.
> This looks strange to me... Anyone think of reason of the error?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



CLI access hampered by session?

2007-09-16 Thread haj

Hi,

I've been trying to call a controller via CLI. I basically followed
this Bakery tutorial:

http://bakery.cakephp.org/articles/view/calling-controller-actions-from-cron-and-the-command-line

so, copied index.php and change it to take command line args. Then
upon calling an action via ssh, I get error like:


PHP Fatal error:  Call to undefined function: session_cache_limiter()
in /var/www/html/cake/libs/session.php on line 153

The session itself must be working since I'm using session to track
user login in regular (not CLI) web access pages.
This looks strange to me... Anyone think of reason of the error?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Why does this shitty Ggroups need 10 mins to post?

2007-09-15 Thread haj

I don't cal myself a heavy user of google group but I haven't
encountered any difficulty so far... I'm using ONLY web interface,
BTW.
This is much faster than yahoo group.

I think the biggest benefit of using google group is that it is part
of google, so searching can take advantage of google's search engine,
and it's likely this group feature won't be killed any time soon,
server won't get down frequently as low-finance private server, etc.


On Sep 15, 10:11 pm, "Danijel Kurinčič" <[EMAIL PROTECTED]>
wrote:
> but I want to have things tidy in my e-mail account and cakephp group has 
> 36161
> messages! *56 a day!* Not enivronmentally friendly to send them around in
> vain :)
>
> now I remember, that the interface I have used to be "beta" version... but I
> don't see the "switch back" option any more... maybe it is only the crappy
> 'new' interface?
>
> I'll also try with atom feed...(but it doesn't solve the posting problem...)
>
> On 9/16/07, Dr. Tarique Sani <[EMAIL PROTECTED]> wrote:
>
>
>
> > On 9/16/07, Danijel Kurinčič <[EMAIL PROTECTED]> wrote:
> > > Google groups is not a web forum, but is a mailing list (with some poor
> > > features that resemble a webforum)
>
> > Give it up - the change is not happening (and I feel rightly so - I
> > prefer mailing list over forums)
>
> > > Of course I shall put my best effort into getting the most of using
> > gGroups
> > > as well. So please be so kind and tell me, how do You browse through
> > > discussions through email interface? Do you get every single mail, or do
> > you
> > > just get some shortened version?
>
> > I get every single mail to my Gmail account - I have a filter which
> > labels the mail as being from CakePHP and skips the inbox - Threading
> > is done by Gmail itself, If there are any threads which I find are
> > just not getting anywhere - I mute them (hint ;) )
>
> > HTH
>
> > T
>
> > --
> > =
> > Cheesecake-Photoblog:http://cheesecake-photoblog.org
> > PHP for E-Biz:http://sanisoft.com
> > =


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Editor x CakePHP

2007-09-08 Thread haj

if it can do 2 bytes..

On Sep 8, 7:15 pm, Felix Geisendörfer <[EMAIL PROTECTED]> wrote:
> [x] Textmate
> --
> My Blog:http://www.thinkingphp.org
> My Business:http://www.fg-webdesign.de
>
> Chris Hartjes wrote:
> > On 9/8/07, Zoltan <[EMAIL PROTECTED]> wrote:
>
> >> There's a few that provide at least syntax highlighting - NotePad++ is
> >> a good lightweight, Opensource app. Dreamveaver provides some code-
> >> hinting, but it's not cheap. Eclipse seems to have good integration
> >> (see:http://bakery.cakephp.org/articles/view/setting-up-eclipse-to-work-wi...)
> >> , but I fear it's too heavy for my laptop.
>
> > I use Komodo on a Mac.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: regarding making upload function work in Cake php

2007-08-31 Thread haj

You made my day LOL

On Aug 31, 3:48 am, Grant Cox <[EMAIL PROTECTED]> wrote:
> I had that problem recently - the upload button wouldn't work if I
> just clicked it, but I found that really pressing it hard would
> usually do it.  I took the button apart and found out the contacts
> were just dirty.  Cleaned it with some steel wool (we also sprayed it
> with some Web 2.0 - looks awesome), and now it's good as new.
>
> http://www.slash7.com/pages
>
> On Aug 30, 7:16 pm, cake php <[EMAIL PROTECTED]> wrote:
>
> > hi
> > we changed our server and suddenly the upload function with the browse
> > button stopped working.
> > we have recently got this job, we are hard core php programmers , we
> > dont know anything about
> > cake php
>
> > can we get some help
> > DJ


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cakephp and PostgreSQL

2007-08-23 Thread haj

Version below 7.2 doesn't yet use information_schema thing so if you
use such a bit older version you'd need to do something...

On Aug 23, 4:48 am, michael lucas <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> I'm using cakephp with mysql right now, which is really simple also
> due to mysql "describe" function that tell cakephp how my tables look.
> I know that PostgreSQL lack "describe" function. So when I change my
> dbms to PostgreSQL will it mean that I have to specify in some cakephp
> configuration file how my tables are constructed?
>
> Or will cakephp use some nifty method to obtain from postgresql
> informations about table? If so, I'm pretty interested how is this
> done?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: N/A option in select (dropdown) element

2007-08-13 Thread haj


> I can also add the post-submission code to look out for the string
> 'NULL' instead of an ID,

This is what I'd do ;p) I'm using 1.1, tho.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Maths

2007-08-13 Thread haj

I'm having hard time imaging why the need for array layout like the
latter -- implementation or algorithm where this array needed may have
a rethinking.

...but, and I'm not math expert (well, this isn't a question of math
anyway), you could just...

1) sort the 1st array
2) you can now take first 2 largest value and least value (exclude 0),
store them somewhere
3) fill the 2nd array with the stored value with for/foreach loop.



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: how to implement this functionality

2007-07-23 Thread haj

I would drop MODULES table which seems meaningless to me and rename
MODULES_ROLES_USERS to MODULES instead. Then in MODULES model, define
Modules hasMany ROLES and USERS. When adding new module, use
generatelist() to make lists for Roles and Users.


On Jul 23, 11:20 am, rtanz <[EMAIL PROTECTED]> wrote:
> i have a modules table storing module info:
> MODULES
> id
> name
> 
>
> and a roles table storing a number of roles:
> ROLES
> id
> name
>
> and a users table storing info about users:
> USERS
> id
> name
> 
>
> and a join table storing the links between them,
> MODULES_ROLES_USERS
> id
> module_id
> role_id
> user_id
>
> Now I would like that when I create a new MODULE I will be given the
> option to select a USER(dropdown) and his ROLE(dropdown) within that
> module. How can i do this and was i correct in making that join table
> or should is this functionality done another way in cakephp? thanks


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



PostgreSQL 7.3 information_schema doesn't exist

2007-07-11 Thread haj

Hi,

I developed an app under MySQL and Postgres 7.4. Now it has to run on
PostgreSQL 7.3 but I found that it can't work because PostgresSQL 7.3
doesn't yet implement information_schema thing...

I'm not yet absolutely sure but it seems at least I have to rewrite
"information_schema" query part in dbo_postgres.php. (I really hope
fixing this part only will solve the problem)

Now I guess this is not necessarily cakePHP question but maybe about
Postgres/PHP question but if some of you could help me with
constructing an equivalent SQL with pg_class thing...or maybe in
conjunction with pg_meta_data().

With pg_meta_data(), I seem to get: num, type,len,not null,has default
information while I need to fill in

column_name AS name,
data_type AS type,
is_nullable AS null,
column_default AS default,
ordinal_position AS position,
character_maximum_length AS char_length,
character_octet_length AS oct_length

so still col name, default val, and octet length.
forgive me for the lazy question, I'm yet uncomfortable with
postgres ;-(


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CakePHP php5?

2007-05-28 Thread haj

PHP4 support is one of the most important features and advantages and
selling point of cakePHP. This is not for some CS student's research
homework. Work in the field and realise a significance of PHP4
support.

On May 28, 11:16 am, "R. Rajesh Jeba Anbiah"
<[EMAIL PROTECTED]> wrote:
> On May 28, 7:08 pm, nate <[EMAIL PROTECTED]> wrote:
>
> > What do you mean by "museum versions"?  You mean that PHP4 is old, or
> > that nobody uses it?  Oh wait, over 90% of public webservers still use
> > it.  Nevermind
>
>IMHO, it's always better to move upward. If you gonna support PHP
> FI, 3, etc, there is no end. For the host, it's not their will, but
> some people prefer the PHP 4 like they did prefer 3 when 4 came and
> etc. There is no end...
>
> --
>   
> Email: rrjanbiah-at-Y!comBlog:http://rajeshanbiah.blogspot.com/


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cake PHP - Multiple database connections

2007-05-28 Thread haj

Will this help?

http://groups.google.com/group/cake-php/browse_thread/thread/58ea010f930fab6c/

On May 28, 2:06 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I am a newbie in CakePHP, just wanna know, how can I create multiple
> database connections?
> Hope anyone can help me, thanks in advance!
>
> - Eriberto 'Jay' Roxas Jr.
>   4th year ComSci student


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Biometrics Authenication

2007-05-17 Thread haj

ok, I re-read your message...

check out this basic tutorial:

http://manual.cakephp.org/appendix/simple_user_auth

This pretty much explains how to do with session and some easy login
system example. There is no authenication system in cakePHP itself.
For time-out thing, I've no idea - If I had to do, I'd do some tedious
work via javascript and storing login-time in DB even.



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Biometrics Authenication

2007-05-17 Thread haj

Assuming you have a way to retrieve necessary data from the finger
print system, you can create a whatever key (name, login time etc) in
a session array (and easier via cakePHP). And create a function, say,
checkLogin() which checks if the user name is in the session or the
time is ok, and put this function in any controller where you need to
check login status. If checkLogin() fails update the finger print
system and tell that to the user and redirect to login page, for php
(cakePHP) side, if session date is left delete it.

I'm not sure if what you're trying to do is something complicated but
I thought it was as simple like that..

If time-out must not be lousy check, you'd have to periodically
trigger time-check function, this you may need to implement in
javascript or some other way.

Anyway, ACL itself is not about stuff like this. If your auth scheme
is complicated (many permission levels, sections, etc) it would help
implimenting *that* part but not auth system at all.

Not sure I'm least helping tho...

On May 17, 3:01 pm, joe west <[EMAIL PROTECTED]> wrote:
> Dear Haj,
>
> Thank you for your reply.  I have no problem parcing the XML data.  I
> just wanted to know HOW
> I integrate my response into CAKEPHP's session and authenication model
> so that it will call
> this function instead,  whenever authenication is required
>
> Example:
>
> New user arrives at site.  Normally a log-in screen would show.  I
> need the fingerprint system
> to step in, get authenication and return the results.
>
> Time-out example:  User stays on one page to long.  Makes
> request.  Session is expired.  Fingerprint
> module called.
>
> Hopefully this explains what I am asking better.  Thank you for your
> time
>
> Joe West
>
> On May 17, 1:23 pm, haj <[EMAIL PROTECTED]> wrote:
>
> > If you create an interface to the XML in PHP, forgetting cakePHP, then
> > integrate it in cakePHP. To keep the status learn the manual for the
> > simlest auth sample using session. Then you may want to integrate it
> > into ACL if the need be. CakePHP is not ready-to-go application which
> > can do everything with "setup" but it's a framework which will ease
> > low-level develpment IMHO..
>
> > On May 17, 11:25 am, joe west <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
>
> > > This is my first post to this group.  I am very impressed with PHPCAKE
> > > framework and I believe that it has alot of the features that I need
> > > for my current project.
>
> > > My Problem:  I have a Biometrics Authenication system (fingerprint)
> > > that will be used to log in to the site.
>
> > > I have seen mention that other authenciations systems can be used with
> > > PHPCAKE , but cannot find anything that will let me know how I would
> > > need to set this up.
>
> > > The biometrics system uses a Tomcat server that is seperate from the
> > > Site Server (Apache 2.0).
> > > It is a seperate call to the Tomcat server with XML return that is
> > > parsed to validate the User.
>
> > > It returns the user name and several other Identification info.  How
> > > can  I utilize this for Time-out functions, the ACL system, and  new
> > > authenication.
>
> > > Any help would be appreciated.  Like I said I have researched
> > > everything I can find and found nothing that would help me.
>
> > > Thank you,
>
> > > Joe West- Hide quoted text -
>
> > - Show quoted text -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Biometrics Authenication

2007-05-17 Thread haj

If you create an interface to the XML in PHP, forgetting cakePHP, then
integrate it in cakePHP. To keep the status learn the manual for the
simlest auth sample using session. Then you may want to integrate it
into ACL if the need be. CakePHP is not ready-to-go application which
can do everything with "setup" but it's a framework which will ease
low-level develpment IMHO..

On May 17, 11:25 am, joe west <[EMAIL PROTECTED]> wrote:
> Hi,
>
> This is my first post to this group.  I am very impressed with PHPCAKE
> framework and I believe that it has alot of the features that I need
> for my current project.
>
> My Problem:  I have a Biometrics Authenication system (fingerprint)
> that will be used to log in to the site.
>
> I have seen mention that other authenciations systems can be used with
> PHPCAKE , but cannot find anything that will let me know how I would
> need to set this up.
>
> The biometrics system uses a Tomcat server that is seperate from the
> Site Server (Apache 2.0).
> It is a seperate call to the Tomcat server with XML return that is
> parsed to validate the User.
>
> It returns the user name and several other Identification info.  How
> can  I utilize this for Time-out functions, the ACL system, and  new
> authenication.
>
> Any help would be appreciated.  Like I said I have researched
> everything I can find and found nothing that would help me.
>
> Thank you,
>
> Joe West


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: SELECT LAST_INSERT_ID() and COUNT(id)

2007-04-15 Thread haj

Thanks for an educating post. It's always helpful not only for
questioner but for many lurkers quietly educating themselves :-)

On Apr 15, 5:34 pm, "nate" <[EMAIL PROTECTED]> wrote:
> The "SELECT COUNT(*)" query is used to determine whether or not the
> record exists.  Based on the result of query, Cake will either perform
> an INSERT or UPDATE query.  If an insert is performed, "SELECT
> LAST_INSERT_ID()" query is functionally equivalent to mysql_insert_id
> (though more reliable for large integers), and is used to get the ID
> of the newly created record.  Neither of these queries are the result
> of a bug, nor is the fact that they appear multiple times (once each
> per insert).  You cannot disable them without quite a bit of trouble,
> and I don't think you'd want to, as it would break Cake's normal
> operation.
>
> Rhetorical question, posed to no one in particular: why is it that
> people will automatically jump to the conclusion that a particular
> behavior is a bug just because it isn't consistent with how they think
> it should work?  At this point, CakePHP has become a big enough
> project that it has attracted a lot of help (in the form of advice,
> patches, etc.) from a lot of really smart people.  We on the dev team
> also do a lot of research into the techniques of other really smart
> people when deciding how certain things should work (using SELECT
> LAST_INSERT_ID() instead of mysql_insert_id is a perfect example).
> So, for the most part, most aspects of the framework represent the
> aggregation of the knowledge and wisdom of all those really smart
> people, and therefore the best way to go about doing things.  That
> being the case, which seems more likely: a bug in the code, or a bug
> in someone's understanding of it?
>
> In fairness, I will say that most people (lately) have been pretty
> good about asking questions about things in an unassuming way before /
> instead of submitting tickets, but I think it still happens the other
> way around often enough for me to raise the question.  Anyone else
> notice this or am I the only one?
>
> On Apr 15, 10:13 am, "majna" <[EMAIL PROTECTED]> wrote:
>
> > This is something new in core, i just wonder why is there.
> > I think it is merged down form 1.2 in 1.1.14 release.
> > Documentation do not cover things like this, so I ask here, then
> > ticket...
> > It is important for me to know why some feature is there, how can i
> > use it.
> > Why is there same query twice?
>
> > @savagekabbage
> > example: saving order with 5 products (including product options and
> > stuff) generate 15 queries, and cake add for each insert 2x this
> > above- about 20.
> > And they are duplicated demnit.
> > This must be a bug. How can cake save my life? :)
>
> > On Apr 15, 2:26 am, "savagekabbage" <[EMAIL PROTECTED]> wrote:
>
> > > Actually disregard my last message, I misread your post.  I'm not sure
> > > if there's a way to avoid doing this without hacking the source
> > > though.  If you're worried about one extra query per page then the
> > > Cake framework probably isn't for you.
>
> > > On Apr 14, 9:05 am, "majna" <[EMAIL PROTECTED]> wrote:
>
> > > > There is two additional query after creating new record:SELECT
> > > > LAST_INSERT_ID() AS insertID
>
> > > > and two after update: COUNT(id)
>
> > > > How to avoid this behavior? Why is it there?
> > > > CAKE 1.1.14,


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Passing data between models

2007-04-13 Thread haj

I would simply add "is_approved" field to userAdmin table...



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: FileHandler Question - plz help

2007-03-12 Thread haj

I'm trying to use the same component right now and having problems
(I'm a noob Baker myself, BTW, so bear with me)

First, I'm using supposedly version 1.1 file (got by clicking 1.1
link) in which the comment inside says 1.0 but I assume it is 1.1.

I gues your code is directly copied from the post:
http://groups.google.com/group/cake-php/msg/adc714b8bf025edf

Now, here's what I'm finding... (I'm still in the middle of
understanding this component, so this is just posting a little memo
tip I've found so far)

the file input filed is expected like as: 
you can't do: $html->input('Controller/filefield', array('size' =>
'60'))

now, for the physical folder, assuming you have
htdocs\cakefolder\app\webroot\files
(the above is a case of Windows, of course)

you set upload method in your controller as:

$this->FileHandler->upload('filefield', 'files/');

This should work (under php4). I didn't thoroughly read your post and
I'm just assuming it's a simple path problem.

This component sets various errors inside but there's no method which
displays it so make a simple is useful...
Put this at the bottom of class definition:

function printError() { echo $this->errorMessage; }

Of course, it's a quick hack do more proper way if needs be.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: New Cake FAQ

2007-03-10 Thread haj

Aside from FAQ, is there "please add this to the manual" list
somewhere?

As a new learner, I found this kind of information:
http://groups.google.com/group/cake-php/browse_thread/thread/24a49fe06b1d7938/a81afff37d2400ff?lnk=gst&q=other+model&rnum=2#a81afff37d2400ff

is REALLY valuable and I don't want to scratch my head for hours
trying discover such must-be-a-trivial-thing-if-you-knew-already.
(BTW, the above is also really a good candidate for FAQ, in my noob
opinion)


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: New Cake FAQ

2007-03-09 Thread haj

rtconner:

I think the "blog tutorial" pretty much satisfies problem 1 and 2.
Then it is a problem of the tutorial not getting big attention for the
beginner...

On Mar 9, 1:49 pm, "rtconner" <[EMAIL PROTECTED]> wrote:
> I'm pretty much a noob. I just started on cakePHP 2 days ago.
>
> Biggest questions so far...
>
> Problem 1: Make a Hello World Application. I found nothing like this,
> just messed around with things and figuered it out eventually.
>
> Problem 2: Make a Hello World Application which connects to the
> database. The blog tutorial was great, its a good thing I had no idea
> that it existed until I had figuered it out already.
>
> Problem 3: My practice application had the commonly used date fields
> in it. Any system worth its weight in anything would have some
> automated date handling. It took me forever to find a way to  easily
> handle dates.
>
> I'm still learning. But its not been easy to get started at all.
> Nothing seems to have gone right. I guess, my biggest problem was
> locating tutorials on how to get started on basic functions. It seems
> they exist, I did not know they were there at all though.
>
> -Rob


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: New Cake FAQ

2007-03-09 Thread haj

Q: What really is vendors and how do I use it? (benefits explanation
in a big picture with simple damn example)
Q: What really is components? (manual explanation doesn't clearly
explain me what it is and why they exists)
Q: How can split big controller files (or other type files) and
manage?
Q: Some concrete example of why something should go "pages" rather
than "layouts"
Q: Where should I implement a model function which lays on several
tables? (asking a good practice)
Q: Any target date for 1.2, or is it stable enough to use in
relatively serious real world biz app?

Those are questions obviously from a new learner but the manual
doesn't explain why they're there and for what etc..


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---