Wednesday, March 31, 2010

Re: Undefined variable: javascript

Try:

$this->Html
$this->Javascript

Jeremy Burns
jeremyburns@me.com


On 1 Apr 2010, at 06:57, Ambika Kulkarni wrote:

> Notice (8): Undefined variable: javascript [APP/views/layouts/
> default.ctp, line 6]
> Fatal error: Call to a member function link() on a non-object in /var/
> www/cake/app/views/layouts/default.ctp on line 6
>
> Controller Code is
> var $components = array('Auth');
> var $helpers = array('Javascript','Form','Html','Event');
>
> default.ctp
> <?php echo $html->css('datepicker')."\n"; ?>
> <?php echo $javascript->link('datepicker.js')."\n"; ?>
>
> $helpers array is defined only in AppController
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
>
> 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
>
> To unsubscribe, reply using "remove me" as the subject.

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

Re: Retrieving objects from the DB instead of arrays

After your $model->find(), you can try the Set::map() function on the
resulting array (see: http://book.cakephp.org/view/676/map). I
haven't personally used it myself, but the documentation indicates
"Basically, the map function turns array items into initialized class
objects."

On Mar 30, 8:31 pm, paws_galuten <jason.galu...@gmail.com> wrote:
> I'm new to cakePHP and it seems like the only way to retrieve data
> from the data source is as an array. I'm finding that I am using a lot
> of code in my controller to prepare the arrays for display in the
> view, when I would rather be able to send an object to the view and
> get data from that object.
>
> For example, if I had a person object, I could have an attribute that
> was their birthdate and in the view I could easily get their age with
> something like $person->getAge(). If I only have the person as an
> array, then I have to do the calculating of the age before I can
> display it.
>
> Does this make sense? It is a simplistic example, but I can see myself
> having to write a lot of code to manipulate arrays before the raw
> database data is usable.
>
> Thanks for your insights,
> Jason

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.

Undefined variable: javascript

Notice (8): Undefined variable: javascript [APP/views/layouts/
default.ctp, line 6]
Fatal error: Call to a member function link() on a non-object in /var/
www/cake/app/views/layouts/default.ctp on line 6

Controller Code is
var $components = array('Auth');
var $helpers = array('Javascript','Form','Html','Event');

default.ctp
<?php echo $html->css('datepicker')."\n"; ?>
<?php echo $javascript->link('datepicker.js')."\n"; ?>

$helpers array is defined only in AppController

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.

Custom flash messages

I've been playing around trying to customize my flash messages with CSS and I'm having a bit of trouble. 

I tried to define the class with the message itself  .... 

[code]    $this->Session->setFlash(__(' Some Flash message here ', array('class' => 'flash_failure')));    [/code]

I also tried to use the example in the CookBook and create separate .ctp files in the layouts folder and defining the views that way but that didn't seem to work either. 

The message shows up fine in the view but it shows as plain text and no CSS style. 

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
 
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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

Re: Can I do the following with cakephp?

On Apr 1, 12:46 am, Bankai <hgnelso...@gmail.com> wrote:
> - Export results of a database table to excel

Have a look at this article:
http://bakery.cakephp.org/articles/view/csv-helper-php5

Be sure to see the author's updated version here:
http://ifunk.net/cakephp/helpers/csv.php.txt

Finally, here's my updated version:
http://pastebin.com/3bfNQRyC

I made a couple of changes also. I remember I had to play around with
the headers a bit. Same as always when doing this sort of thing.

Here's a quick example of usage:

MembersController:
/**
* Get a CSV dump of the membership
*
* @param void
* @return void
* @access public
*/
public function admin_csv()
{
$this->set('data', $this->Member->getDataDump());
$this->set('filename', 'members_'.date('Y-m-d').'.csv');
Configure::write('debug', 0);
$this->layout = 'ajax';
$this->viewPath = 'elements';
$this->render('csv_dump');
}

Member:
/**
* retrieve Member data for CSV output
*
* @param void
* @return void
* @access public
*/
public function getDataDump()
{
$filters = array(
'conditions' => array('Member.admin' != 1),
'fields' => array(
'Member.id',
'Member.founding',
'Member.first_name',
'Member.last_name',
'Member.organisation',
'User.email',
'Member.address_1',
'Member.address_2',
'Member.city',
'Region.name',
'Country.name',
'Member.postal_code',
'Member.telephone',
'Member.fax'
),
'contain' => array('User', 'Region', 'Country'),
'order' => array('Member.last_name' => 'DESC')
);
$tmp = $this->find('all', $filters);

$data = array();

foreach ($tmp as $key => $row)
{
$data[] = array(
'id' => $row['Member']['id'],
'founding' => ($row['Member']['founding'] ? 'yes' : 'no'),
'first_name' => $row['Member']['first_name'],
'last_name' => $row['Member']['last_name'],
'organisation' => $row['Member']['organisation'],
'email' => $row['User']['email'],
'address_1' => $row['Member']['address_1'],
'address_2' => $row['Member']['address_2'],
'city' => $row['Member']['city'],
'region' => $row['Region']['name'],
'country' => $row['Country']['name'],
'postal_code' => $row['Member']['postal_code'],
'telephone' => $row['Member']['telephone'],
'fax' => $row['Member']['fax']
);
}

return $data;
}

app/views/elements/csv_dump.ctp:

<?php
if (isset($filename)) $csv->setFilename($filename);
$csv->clean_output = true;
$csv->addGrid($data);
echo $csv->render();


> - Have an autosave feature like google docs into my web app

That's a client-side thing. Use AJAX to periodically save your data.

> - Whats the best javascript framework (jquery, mootools, prototype,
> etc) to use along with cakephp

Until recently, Prototype was the only JS framework that Cake had
built-in methods for. But that has changed. I know jQuery is now
supported but I'm not sure of the others. I don't bother using the
helpers, myself, as I've always preferred jQuery (and so was forced
not to use the helpers).


> And now the biggie!
> - Lets say I live in a third world country (which I do), and the
> lights go out every once in a while. Can I develop a program with
> cakephp, where each workstation thats connected to the server (where
> my web app is) save its own copy of the work that they are doing?
> Until that connection resumes to the server? What I want to do is
> avoid loss of data if the lights go out somehow. We know that if we
> are working in a word doc, and the machine unfortunately freezes or
> shuts down for whatever reason, the next time we open MS Word it pops
> out a file recovery dialog, and we know the rest. I want to develop
> something like that with a cakephp in my web app.

The periodic autosave mentioned above is about all i can think of, and
so will only have saved up to n minutes before the power happens to
quit. Once the power dies, there's nothing your workstation can do to
send data to the server. It becomes a doorstop immediately.

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.

Re: always use singular model and controller names

Try adding some custom inflections (plurals):

http://book.cakephp.org/view/953/Inflections

Jeremy Burns
jeremyburns@me.com


On 31 Mar 2010, at 22:42, tekcorap wrote:

> Hi everyone, I have a small problem. I'm using CakePHP 1.2.6.
> Unfortunately, not as in English plurals in Turkish. eg
> "makale"(article) in the plural of the word Turkish "makaleler" (not
> articles). Create a model when I check the articles CakePHP table
> names should be in the form of my makalelers. I do not use any English
> name control.I do not want to have plural model names automatically.
> All names must be singular model. how can I do?
>
> Thank you for your help.
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
>
> 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
>
> To unsubscribe, reply using "remove me" as the subject.

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

Can I do the following with cakephp?

- Export results of a database table to excel
- Have an autosave feature like google docs into my web app
- Whats the best javascript framework (jquery, mootools, prototype,
etc) to use along with cakephp

And now the biggie!
- Lets say I live in a third world country (which I do), and the
lights go out every once in a while. Can I develop a program with
cakephp, where each workstation thats connected to the server (where
my web app is) save its own copy of the work that they are doing?
Until that connection resumes to the server? What I want to do is
avoid loss of data if the lights go out somehow. We know that if we
are working in a word doc, and the machine unfortunately freezes or
shuts down for whatever reason, the next time we open MS Word it pops
out a file recovery dialog, and we know the rest. I want to develop
something like that with a cakephp in my web app.

If you know how, please guide me somewhere, don't just say "yes you
can". Any help It would be greatly appreciated.

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.

Re: App::import - not working, how to bugtrace

On Mar 31, 7:36 pm, schizophrenie <yaf...@yahoo.de> wrote:
> Hi  @ all,
>
> i was following up a googlemap tutorial, i've recognized that the code
> is old, so i've updated nearly everything but one thing isn't
> working.
>
> instead of vendor('googlegeo')  i am using  App::import('Vendor',
> 'googlegeo')
> but i think its not loading, because my class within is not
> recognized,

Are you sure that the class name is 'googlegeo'? Check the case.

Try also giving the path to the file:

App::import('Vendor', 'googlegeo', array('file' => PATH))

Where PATH is the path to the file from the vendors dir, ie if it's in
app/vendors/google/google_geo.php you specify 'google/google_geo.php'
as the path.

> i've also tried it with App::import('Controller', 'Users')
> to create a new UsersController, which has also failed.

That class name should be UsersController.

> how can i test if my app is loading the file?

$googlegeo = new googlegeo(); //or whatever the actual class name is

If that fails spectacularly, your file wasn't loaded.

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.

Queue plugin trouble

I've set up the Queue plugin to handle email jobs for a site. It's
worked pretty well but suddenly I'm seeing multiple emails go out or
none at all. It seems that the worker is either not being launched or
is failing to properly update the DB (so completed jobs are not marked
as such). I should note that I'm not running the workers from a cron
job but executing them immediately from my controller. It calls the
plugin component's load() which then creates the job, then it should
run a worker (which would then run my shell task).

public function load($task_name, $data = array())
{
if ($queued = $this->QueuedTask->createJob($task_name, $data))
{
// http://www.zeen.co.uk/code/view/run-cakephp-console-from-a-component
$cmd = 'nohup
'.CAKE_CORE_INCLUDE_PATH.DS.'cake'.DS.'console'.DS.'cake'
. ' -app '.APP.' queue runworker >/dev/null &';

exec($cmd);
}
return $queued;
}

Is anyone familiar with this plugin? I'm having some trouble figuring
out how best to debug this.

http://bakery.cakephp.org/articles/view/cakephp-simple-queue-plugin
http://wiki.github.com/MSeven/cakephp_queue/

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.

App::import - not working, how to bugtrace

Hi @ all,

i was following up a googlemap tutorial, i've recognized that the code
is old, so i've updated nearly everything but one thing isn't
working.

instead of vendor('googlegeo') i am using App::import('Vendor',
'googlegeo')
but i think its not loading, because my class within is not
recognized, i've also tried it with App::import('Controller', 'Users')
to create a new UsersController, which has also failed.

how can i test if my app is loading the file?

thank you very much.

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.

Re: Newbie question for "best practice" on how to combine CakePHP with a (given) design

Hey guys,

thanks a lot for these very useful hints. I will definitely do some
more reading and start experimenting along the lines of your
suggestions.
And probably come back with more specific questions then.. :-)

Cheers,
Oliver


On Mar 29, 6:05 pm, cricket <zijn.digi...@gmail.com> wrote:
> To add to Jeremy's comments,
>
> In your menu elements, you can refer to the present location with
> $this->here, so you can have logic for showing/hiding submenus, etc.
> and avoid having to create separate layouts for each menu situation.
>
> For my login_prompt element, I check if the user is already logged in
> like this:
>
> if (!$session->read('Auth.User'))
> {
>    // show "login" link}
>
> else
> {
>    // show "logout" and "profile" links
>
> }
>
> If your users table has an "admin" column (0 or 1) you can do if
> ($session->read('Auth.User.admin')) to test whether you should include
> admin-specific links or whatever. Note that User is uppercase, as
> that's the name of the model. In your controllers, though, you'd use
> AuthComponent's user() method: $this->Auth->user('admin').
>
> For including disparate bits of code you can place several $this->element() calls and use requestAction() in the elements. Make sure
>
> you have caching enabled in core.php and specifify that you want the
> element to be cached because each requestAction() call creates an
> entirely new request through Cake, which is expensive. By caching the
> element you avoid doing that each time. See this article:
>
> http://bakery.cakephp.org/articles/view/creating-reusable-elements-wi...
>
> Or search for "cakephp requestaction cache" or similar.
>
> On Mar 29, 8:49 am, janitor048 <janitor...@googlemail.com> wrote:
>
> > Hi there,
>
> > I'm pretty new to CakePHP (and MVC in general for that matter) and I'm
> > just working through the docs etc.
> > And since the cookbook is quite informative, I think I've got a pretty
> > good idea of what CakePHP could do for me by now.
>
> > However, I would like to ask a question on best or common practice on
> > how to actually integrate my pieces of cake with a given design.
> > So that I can keep these suggestions in mind when digging even deeper
> > into the documentation.
>
> > Say, I've got a webpage that features
> > - a main "view" area in the center
> > - a main menu at the top that stays constant over all pages
> > - a side menu to the left that stays constant over some pages but does
> > in general depend on the content of the central area
> > - a small side area to the right with some login / admin bits-and-
> > pieces.
>
> > Pretty common and probably pretty close to the actual project I'm
> > about to work on.
> > The general layout as described above I would like to design using
> > dreamweaver (for instance) and setting up a css formatted page using
> > divs.
>
> > The main toolbar would probably best go into a common cake layout
> > file. But what about the rest? View files with elements for left menu
> > and login-area on the right? Login stuff as an element and the left
> > menu in layout files that are selected by the controller accordingly?
>
> > Can I attach id-based css rules to a specific element created by a
> > (say) form helper? For positioning purposes and the like..
>
> > And finally: What is the best way to incorporate bits and pieces from
> > different models / controllers into a single view? That would
> > something like a summary page, e.g. showing the 5 latests news, the 3
> > latest pictures and the most popular comments (or whatever you like)
> > in different areas of a single page (as delivered to the user).
>
> > Any hints and suggestions would be highly appreciated.
> > Cheers,
> > Oliver

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.

always use singular model and controller names

Hi everyone, I have a small problem. I'm using CakePHP 1.2.6.
Unfortunately, not as in English plurals in Turkish. eg
"makale"(article) in the plural of the word Turkish "makaleler" (not
articles). Create a model when I check the articles CakePHP table
names should be in the form of my makalelers. I do not use any English
name control.I do not want to have plural model names automatically.
All names must be singular model. how can I do?

Thank you for your help.

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.

Re: Use singleton for database connection

Could you give us more background?

On Wed, Mar 31, 2010 at 4:06 PM, dyutiman <dyutiman.chaudhuri@gmail.com> wrote:
Hi,
I need to run multiple processes of my application, built in Cakephp.
And for that I need it to use singleton for its database class. Is
there any way I can achieve that here...

Have anybody  thought about this..

thanks
Dyutiman

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.



--
-

"You can't reason people out of a position they didn't use reason to get into."

Christian Leskowsky

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
 
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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

Use singleton for database connection

Hi,
I need to run multiple processes of my application, built in Cakephp.
And for that I need it to use singleton for its database class. Is
there any way I can achieve that here...

Have anybody thought about this..

thanks
Dyutiman

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.

Re: $this->...->query("...");

I suggest you turn on debug and print out what is returned from the
query, because the query is going straight to the database - CakePHP
is not doing anything to it! So what you see in your debug information
in your first post is not related to this query!
What your first post debug information shows, look like a pagination -
a count and a find!
Can you check and clarify what is your real issue here?
Enjoy,
John

On Mar 31, 9:26 pm, Dominik Kukacka <dominik.kuka...@gmail.com> wrote:
> Hey my complete function is:
>
>         $user = $this->Auth->user();
>         $this->Planet->recursive = 0;
>
>         $planets = $this->Planet->query("SELECT *
>                                         FROM planets AS Planet
>                                         LEFT OUTER JOIN buildings AS
> Building
>                                         ON (Planet.id =
> Building.planet_id)
>                                         WHERE Building.user_id=".
> $user['User']['id'].";");
>
>         $this->set('planets',$planets);
>
> greets
> Dom
>
[snip]

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.

Re: $this->...->query("...");

Hey my complete function is:

$user = $this->Auth->user();
$this->Planet->recursive = 0;

$planets = $this->Planet->query("SELECT *
FROM planets AS Planet
LEFT OUTER JOIN buildings AS
Building
ON (Planet.id =
Building.planet_id)
WHERE Building.user_id=".
$user['User']['id'].";");

$this->set('planets',$planets);

greets
Dom

On 31 Mrz., 19:40, John Andersen <j.andersen...@gmail.com> wrote:
> We need more information! How are you realizing your query - are you
> using CakePHP models find or query method?
> Please show the code where you are using your query!
> Enjoy,
>    John
>
> On Mar 31, 6:18 pm, Dominik Kukacka <dominik.kuka...@gmail.com> wrote:
>
>
>
> > Hey everyone,
>
> > i tried to make an join query on two tables!
>
> > my query is:
>
> >    SELECT *
> >    FROM planets AS Planet
> >    LEFT OUTER JOIN buildings AS Building  ON (Planet.id =
> > Building.planet_id)
> >    WHERE Building.user_id=1;
>
> > so, the query works well in my PMA and in Workbench (CL),
> > but in cakePHP it makes some additional querys:
>
> > SELECT COUNT(*) AS `count`
> > FROM `planets` AS `Planet`
> > WHERE ((Planet IN ('1', 'Planet Erde', '100', '1', '100', '10', '10',
> > '10', '[1,20,20]', '400'))
> > AND (Building IN ('1', '1', '1', 'command_center', '1', '[25,25]')))
> > AND ((Planet IN ('2', 'Mond', '100', '0', '100', '0', '10', '-5',
> > '[1,21,20]', '100'))
> > AND (Building IN ('3', '2', '1', 'explorer_small', '2', '[10,4]')))
>
> > SELECT `Planet`.`id`, `Planet`.`name`, `Planet`.`space`,
> > `Planet`.`space_used`, `Planet`.`healthpoints`, `Planet`.`oil`,
> > `Planet`.`water`, `Planet`.`heat`, `Planet`.`coordinates`,
> > `Planet`.`size`
> > FROM `planets` AS `Planet`
> > WHERE ((Planet IN ('1', 'Planet Erde', '100', '1', '100', '10', '10',
> > '10', '[1,20,20]', '400'))
> > AND (Building IN ('1', '1', '1', 'command_center', '1', '[25,25]')))
> > AND ((Planet IN ('2', 'Mond', '100', '0', '100', '0', '10', '-5',
> > '[1,21,20]', '100'))
> > AND (Building IN ('3', '2', '1', 'explorer_small', '2', '[10,4]')))
> > LIMIT 20
>
> > This doesn relly can work because of: Planet IN ('1', 'Planet Erde',
> > '100', '1', '100'.. doesn't really make sense; ey?
> > Why does cakePHP do that?
>
> > greets from Vienna
> > Dom

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

Re: Validating not in list

Hello,

thanks for the responses. I used custom validation the way moos3 suggested.


Thanks,
Bart

On Wed, Mar 31, 2010 at 18:33, John Andersen <j.andersen.lv@gmail.com> wrote:
I would go with the custom validation, as you suggested!
Enjoy,
  John

On Mar 30, 10:19 pm, Bart <vangeneug...@gmail.com> wrote:
> Hello,
>
> I'm trying to build an application that is User based.
> However, I want to reserve some nicknames so you can't register them.
>
> When going over the validation rules, I findhttp://book.cakephp.org/view/1171/inList
> Which is basically what I need, but negated.
>
> Is there a way to say something like "not inList". Or just any way to
> negate that statement?
> Or should I just define a function for it?
>
> Thanks,
> Bart

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
 
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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

Re: $this->...->query("...");

We need more information! How are you realizing your query - are you
using CakePHP models find or query method?
Please show the code where you are using your query!
Enjoy,
John

On Mar 31, 6:18 pm, Dominik Kukacka <dominik.kuka...@gmail.com> wrote:
> Hey everyone,
>
> i tried to make an join query on two tables!
>
> my query is:
>
>    SELECT *
>    FROM planets AS Planet
>    LEFT OUTER JOIN buildings AS Building  ON (Planet.id =
> Building.planet_id)
>    WHERE Building.user_id=1;
>
> so, the query works well in my PMA and in Workbench (CL),
> but in cakePHP it makes some additional querys:
>
> SELECT COUNT(*) AS `count`
> FROM `planets` AS `Planet`
> WHERE ((Planet IN ('1', 'Planet Erde', '100', '1', '100', '10', '10',
> '10', '[1,20,20]', '400'))
> AND (Building IN ('1', '1', '1', 'command_center', '1', '[25,25]')))
> AND ((Planet IN ('2', 'Mond', '100', '0', '100', '0', '10', '-5',
> '[1,21,20]', '100'))
> AND (Building IN ('3', '2', '1', 'explorer_small', '2', '[10,4]')))
>
> SELECT `Planet`.`id`, `Planet`.`name`, `Planet`.`space`,
> `Planet`.`space_used`, `Planet`.`healthpoints`, `Planet`.`oil`,
> `Planet`.`water`, `Planet`.`heat`, `Planet`.`coordinates`,
> `Planet`.`size`
> FROM `planets` AS `Planet`
> WHERE ((Planet IN ('1', 'Planet Erde', '100', '1', '100', '10', '10',
> '10', '[1,20,20]', '400'))
> AND (Building IN ('1', '1', '1', 'command_center', '1', '[25,25]')))
> AND ((Planet IN ('2', 'Mond', '100', '0', '100', '0', '10', '-5',
> '[1,21,20]', '100'))
> AND (Building IN ('3', '2', '1', 'explorer_small', '2', '[10,4]')))
> LIMIT 20
>
> This doesn relly can work because of: Planet IN ('1', 'Planet Erde',
> '100', '1', '100'.. doesn't really make sense; ey?
> Why does cakePHP do that?
>
> greets from Vienna
> Dom

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.

Re: Set class help needed

On Mar 31, 10:16 am, "Dr. Loboto" <drlob...@gmail.com> wrote:
> If you pass "fields" option to find("list") as described for grouping
> - this will do all the magic.

Thanks, both, for the tip. I'd forgotten about that option (I don't
think I've used it before). I'm not sure that it'll work in this case,
though, as I'm querying the members table and containing both
countries & regions for the names.

I've already got a complicated method to retrieve a list of countries
and regions that is used elsewhere. In the other place, I'm creating a
list of links of country names, with sublists of regions for those
countries that have them. The former are links to /members/country/[A-
Z]{2} and the latter, /members/region/[A-Z]{2}. Getting the list
involves querying on distinct Member.country_id and distinct
Member.region_id and then merging the two. So, only countries and
regions that have members are represented.

public function locations()
{
$countries = Set::extract(
$this->find(
'all',
array(
'fields' => array('DISTINCT(Member.country_id)'),
'contain' => array(
'Country' => array(
'fields' => array('*')
)
)
)
),
'{n}.Country'
);

foreach($countries as $key => $country)
{
if (in_array($country['iso_code'], array('US', 'CA')))
{
$countries[$key]['regions'] = Set::extract(
$this->find(
'all',
array(
'fields' => array('DISTINCT(Member.region_id)'),
'conditions' => array(
'NOT' => array('Member.region_id' => null),
'Member.country_id' => $country['id']
),
'contain' => array(
'Region' => array(
'fields' => array('*'),
'order' => array('Region.name' => 'ASC')
)
)
)
),
'{n}.Region'
);
}
}
return $countries;
}

This results in the array I posted earlier as the data I was starting
out with. Now, I need to create a select list from that data to show
elsewhere. Of course, I can't have the form point to both country and
region so I decided to only list the regions, grouped by country. In
this case, that's US & Canada. Other countries are not presented. This
suits the client because their membership is limited to those two.
However, there are edge cases where existing members live abroad.

What I ended up doing is abandoning Set and doing it the old-fashioned
way:

$options = array();
foreach($data as $k => $d)
{
if (!in_array($d['iso_code'], array('US', 'CA')))
{
unset($data[$k]);
}
else
{
$options[$d['name']] = array();

foreach($d['regions'] as $region)
{
$options[$d['name']][$region['iso_code']] = $region['name'];
}
}
}

It's damned ugly but it works. I'm using requestAction() and caching
the elements, so I'm not too concerned about the overhead.

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.

All my Page can't find/index

Hii ...

My website host at Multiple Server. Main server at Indonesia (http://
www.jayakartahotelsresorts.com) . at this server my website running
well.
But i have problem at other server, Server Singapore (http://
sg.jayakartahotelsresorts.com) and server USA (http://
us.jayakartahotelsresorts.com). at that server all my page can't read/
index. Notification bellow :
Object not found!

The requested URL was not found on this server. The link on the
referring page seems to be wrong or outdated. Please inform the author
of that page about the error.

If you think this is a server error, please contact the webmaster.
Error 404
us.jayakartahotelsresorts.com
Wed 31 Mar 2010 10:09:57 AM WIT
Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.8b DAV/2 PHP/5.2.5
mod_perl/2.0.4 Perl/v5.8.8
------

please advice how to solve the problem. Thanks
Ronald

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.

Re: Undefined index

Please look at the code at line 32 from the indexsln.ctp file. Compare
the index names with the expected structure. Do you really have an
index named "Endpoint"?
If you still can't see the error, then please show the code at line
32, so we also may be able to look at it :)
Enjoy,
John

On Mar 31, 4:35 pm, newbie <karola.pa...@gmail.com> wrote:
> Hi All,
>
> I'm getting error:
> Notice (8): Undefined index: Audit [APP\views\audits\indexsln.ctp,
> line 32]
> Notice (8): Undefined index: Endpoint
>
> the codes are
>
> index.ctp:
>
>      <?php
>    $options = array_combine ($a_eid, $a_sln);
>    //$form->create('audits'
>     echo $form->create('Audit', array( 'controller' => 'audits',
> 'type' => 'post', 'action' => 'indexsln'));
>     echo $form->select('endpoint_id',$options);//,null,null,false);
>     echo $form->submit('ok');
>     echo $form->end();     ?>
>
> audits_controllers :
>
>         function indexsln()    {
>                 $id = $this->data['Audit']['endpoint_id'];
>                 echo $id; //$sln;
>
>                 $this->set('audits',$this->Audit->query(
>                                 "SELECT * FROM audits,endpoints WHERE endpoint_id
> in
>                                 (SELECT id FROM endpoints WHERE sln in
>                                 (SELECT sln FROM endpoints WHERE id = ".$id."))
>                                 AND audits.endpoint_id = endpoints.id "));
>
>                                 $data=$this->paginate($this->Audit->read());
>     }
>
> indexsln.ctp :
>
> <div class="audits index">
> <h2><?php __('Audits');?></h2>
> <p>
> <?php
> echo $paginator->counter(array(
> 'format' => __('Page %page% of %pages%, showing %current% records out
> of %count% total, starting on record %start%, ending on %end%', true)
> ));
> ?></p>
> <table cellpadding="0" cellspacing="0">
> <tr>
>         <th><?php echo $paginator->sort('id');?></th>
>         <th><?php echo $paginator->sort('endpoint_id');
>                 ?></th>
>         <th><?php echo $paginator->sort('day');
>                 echo $paginator->sort('date');?></th>
>         <th><?php echo $paginator->sort('author');?></th>
>         <th><?php echo $paginator->sort('description');?></th>
>         <th><?php echo $paginator->sort('action');?></th>
>         <th><?php echo $paginator->sort('visible');?></th>
>         <th class="actions"><?php __('Actions');?></th>
> </tr>
> <?php
> $i = 0;
> foreach ($audits as $audit):
>         $class = null;
>         if ($i++ % 2 == 0) {
>                 $class = ' class="altrow"';
>         }
> ?>
>         <tr<?php echo $class;?>>
>                 <td>
>                         <?php echo $audit['Audit']['id']; ?>  // line 32
>                 </td>
>
> debuger result example:
>
>     [viewVars] => Array
>         (
>             [audits] => Array
>                 (
>                     [0] => Array
>                         (
>                             [audits] => Array
>                                 (
>                                     [id] => 6
>                                     [endpoint_id] => 12
>                                     [ton_id] =>
>                                     [day] => 2010-01-16
>                                     [created] => 2010-01-16 20:40:28
>                                     [author] => Ktos
>                                     [trid] => 123444
>                                     [description] => Did Something
>                                     [action] => Change
>                                     [visible] => 0
>                                 )
>
>                             [endpoints] => Array
>                                 (
>                                     [id] => 12
>                                     [ton_id] => 1
>                                     [name] => RU22005-RDFSWQ990099
>                                     [sln] => RU22005
>                                     [fga] =>
>                                     [date] => 2009-11-29 01:39:00
>                                     [push] => Success
>                                     [activation] => Success
>                                     [created] => 2009-11-29 01:43:00
>                                     [modified] => 2009-11-29 01:43:00
>                                     [col1] => k
>                                     [col2] => k
>                                     [col3] => k
>                                     [col4] =>
>                                     [col5] =>
>                                     [col6] =>
>                                     [col7] =>
>                                     [col8] =>
>                                     [col9] =>
>                                 )
>
>                         )
>
> i have the same code as indexsln.ctp in other function when i'm
> sending data using fndAllBy - it's all ok then.
> dubuger seems to be ok in both cases.
>
> Can you please point out what i'm doing wrong?
>
> thx

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.

Re: Class 'TreeBehavior' not found

Ok, just saw the next message in the line! SOLVED


On Mar 31, 7:36 pm, John Andersen <j.andersen...@gmail.com> wrote:
> You probably have to include it yourself, probably using App::import,
> but that is only a guess from my side :)
> Enjoy,
>    John
>
> On Mar 31, 1:19 pm, Michel Kogan <mahnaz...@gmail.com> wrote:
>
> > when class GroupTreeBehavior extending class TreeBehavior, I got this
> > error:
>
> > [quote]
> > Fatal error: Class 'TreeBehavior' not found in /var/www/cakephp/app/
> > models/behaviors/group_tree.php on line 2
> > [/quote]
>
> > line 2 is:
>
> > [code]
> > class GroupTreeBehavior extends TreeBehavior
> > [/code]
>
> > what's the problem ?

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.

Re: Class 'TreeBehavior' not found

You probably have to include it yourself, probably using App::import,
but that is only a guess from my side :)
Enjoy,
John

On Mar 31, 1:19 pm, Michel Kogan <mahnaz...@gmail.com> wrote:
> when class GroupTreeBehavior extending class TreeBehavior, I got this
> error:
>
> [quote]
> Fatal error: Class 'TreeBehavior' not found in /var/www/cakephp/app/
> models/behaviors/group_tree.php on line 2
> [/quote]
>
> line 2 is:
>
> [code]
> class GroupTreeBehavior extends TreeBehavior
> [/code]
>
> what's the problem ?

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.

Re: Validating not in list

I would go with the custom validation, as you suggested!
Enjoy,
John

On Mar 30, 10:19 pm, Bart <vangeneug...@gmail.com> wrote:
> Hello,
>
> I'm trying to build an application that is User based.
> However, I want to reserve some nicknames so you can't register them.
>
> When going over the validation rules, I findhttp://book.cakephp.org/view/1171/inList
> Which is basically what I need, but negated.
>
> Is there a way to say something like "not inList". Or just any way to
> negate that statement?
> Or should I just define a function for it?
>
> Thanks,
> Bart

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.

Re: Help! Files being read from wrong directory

That did it. Thanks. :o)

Note to self... ask before spending hours trying to work it out
yourself!!!

T

On Mar 31, 3:13 pm, "Dr. Loboto" <drlob...@gmail.com> wrote:
> Clear Cake caches. This may occur if you copy temps from one install
> to another.

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.

Re: Cake 1.2.6 - Can't bake anything

Hello

Have you checked driver issues :

http://osdir.com/ml/CakePHP/2009-07/msg00275.html

http://forums.iis.net/t/1156341.aspx

JK

On 30 mar, 14:53, McFrosty <mcfro...@gmail.com> wrote:
> So, I'm new to Cake...that being said, I followed all the directions
> and went through the blog tutorial, so I have a tender grasp of how
> it's supposed to work.
>
> I tried baking my first application today and have met with nothing
> but failure.  While I was able to set up the console without any
> errors, and I was able to bake the project and set up the database
> correctly, anytime I tried to bake the models or run 'bake all' I was
> met with:
>
> Bake All
> ---------------------------------------------------------------
> PHP Warning:  mssql_connect(): Unable to connect: SQL Server is
> unavailable or d
> oes not exist.  Connection is busy. (severity 9) in C:\Inetpub\wwwroot
> \cake12\ca
> ke\libs\model\datasources\dbo\dbo_mssql.php on line 144
>
> Warning: mssql_connect(): Unable to connect: SQL Server is unavailable
> or does n
> ot exist.  Connection is busy. (severity 9) in C:\Inetpub\wwwroot
> \cake12\cake\li
> bs\model\datasources\dbo\dbo_mssql.php on line 144
> PHP Warning:  mssql_connect(): Unable to connect to server:
> itsql.oar.tamu.edu
> in C:\Inetpub\wwwroot\cake12\cake\libs\model\datasources\dbo
> \dbo_mssql.php on li
> ne 144
>
> Warning: mssql_connect(): Unable to connect to server:
> itsql.oar.tamu.edu in C:
> \Inetpub\wwwroot\cake12\cake\libs\model\datasources\dbo\dbo_mssql.php
> on line 14
> 4
> PHP Warning:  mssql_select_db(): supplied argument is not a valid MS
> SQL-Link re
> source in C:\Inetpub\wwwroot\cake12\cake\libs\model\datasources\dbo
> \dbo_mssql.ph
> p on line 151
>
> Warning: mssql_select_db(): supplied argument is not a valid MS SQL-
> Link resourc
> e in C:\Inetpub\wwwroot\cake12\cake\libs\model\datasources\dbo
> \dbo_mssql.php on
> line 151
> PHP Warning:  mssql_query(): supplied argument is not a valid MS SQL-
> Link resour
> ce in C:\Inetpub\wwwroot\cake12\cake\libs\model\datasources\dbo
> \dbo_mssql.php on
>  line 175
>
> Warning: mssql_query(): supplied argument is not a valid MS SQL-Link
> resource in
>  C:\Inetpub\wwwroot\cake12\cake\libs\model\datasources\dbo
> \dbo_mssql.php on line
>  175
> Error: Your database does not have any tables.
>
> I see several of these errors on the cakephp forum, with no real
> answer.  Does anybody have a clue as to what I might be doing wrong?

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.

$this->...->query("...");

Hey everyone,

i tried to make an join query on two tables!

my query is:

SELECT *
FROM planets AS Planet
LEFT OUTER JOIN buildings AS Building ON (Planet.id =
Building.planet_id)
WHERE Building.user_id=1;

so, the query works well in my PMA and in Workbench (CL),
but in cakePHP it makes some additional querys:

SELECT COUNT(*) AS `count`
FROM `planets` AS `Planet`
WHERE ((Planet IN ('1', 'Planet Erde', '100', '1', '100', '10', '10',
'10', '[1,20,20]', '400'))
AND (Building IN ('1', '1', '1', 'command_center', '1', '[25,25]')))
AND ((Planet IN ('2', 'Mond', '100', '0', '100', '0', '10', '-5',
'[1,21,20]', '100'))
AND (Building IN ('3', '2', '1', 'explorer_small', '2', '[10,4]')))

SELECT `Planet`.`id`, `Planet`.`name`, `Planet`.`space`,
`Planet`.`space_used`, `Planet`.`healthpoints`, `Planet`.`oil`,
`Planet`.`water`, `Planet`.`heat`, `Planet`.`coordinates`,
`Planet`.`size`
FROM `planets` AS `Planet`
WHERE ((Planet IN ('1', 'Planet Erde', '100', '1', '100', '10', '10',
'10', '[1,20,20]', '400'))
AND (Building IN ('1', '1', '1', 'command_center', '1', '[25,25]')))
AND ((Planet IN ('2', 'Mond', '100', '0', '100', '0', '10', '-5',
'[1,21,20]', '100'))
AND (Building IN ('3', '2', '1', 'explorer_small', '2', '[10,4]')))
LIMIT 20

This doesn relly can work because of: Planet IN ('1', 'Planet Erde',
'100', '1', '100'.. doesn't really make sense; ey?
Why does cakePHP do that?

greets from Vienna
Dom

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.

Re: Possible to blank (hide) columns and show those again in a complete rendered view?

Hello,

With this code, my problem is solved.

[CODE]
<script type="text/javascript">
function toggleColumn(table, column) {
for (var i = 0; i < table.rows.length; i++){
if (table.rows[i].cells.length > column){
var cell = table.rows[i].cells[column];
cell.style.display = (cell.style.display == "none")? "": "none";
}
}
}
</script>
[/CODE]


[View CODE]
<table>
<tr>
<td><a
onclick="toggleColumn(document.getElementById('tab1'), 1);">1</a></td>
<td><a
onclick="toggleColumn(document.getElementById('tab1'), 2);">2</a></td>
<td><a
onclick="toggleColumn(document.getElementById('tab1'), 3);">3</a></td>
<td><a
onclick="toggleColumn(document.getElementById('tab1'), 4);">4</a></td>
<td><a
onclick="toggleColumn(document.getElementById('tab1'), 5);">5</a></td>
<td><a
onclick="toggleColumn(document.getElementById('tab1'), 6);">6</a></td>
</tr>
</table>

<br><p>

<table id="tab1">
<tr>
<th>[Optionen]</th>
<th>...</th>
...
[/CODE]

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.

Re: Set class help needed

If you pass "fields" option to find("list") as described for grouping
- this will do all the magic.

On Mar 31, 3:13 pm, WebbedIT <p...@webbedit.co.uk> wrote:
> Does the form helper automagically create select lists with OPTGROUPS?

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.

Re: Help! Files being read from wrong directory

Clear Cake caches. This may occur if you copy temps from one install
to another.

On Mar 31, 7:44 pm, TobyG <toby.i.griffi...@googlemail.com> wrote:
> Hi there,
>
> Hope someone can help, as I've just spent the last 2.5 hrs trying to
> track down the cause of this problem, without any success.
>
> I have a cakePHP application happily running in it's own subdirectory
> on our shared hosting server, & I have frequently used an alternative
> subdirectory to upload a test version of the app to ensure all is OK
> on the live server before I updated the live site.
>
> My problem is (& not sure if this occurred previously, as didn't
> receive this kind of error) that my site appears to be reading the
> controller files in from the wrong subdirectory.  I'm not sure how
> this is happening, as there as I can't find any kind of hard coding of
> the directory anywhere.
>
> I have tried to read through the CakePHP code to try to diagnose the
> problem & have got as far as the App::__mapped() function is returning
> the wrong path, which it gets from the App::__map property, however I
> can't, for the life of me, find where this is populated, so I'm at an
> apparent deadend.
>
> Please can someone help me with this?
>
> Thanks,
>
> T

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.

Re: Further Datasource documentation

Not yet! I stopped to work on that for a while...
However, I shall release it as soon as it get good!
Lucca Mordente


On Wed, Mar 31, 2010 at 2:09 AM, alan <zeroasterisk@gmail.com> wrote:
Did you ever build the datasource?  Want to release it on cakeforge or
here?

On Mar 18, 8:56 pm, Lucca Mordente <luccamorde...@gmail.com> wrote:
> Thanks Marco!
> I'll take a deeper look soon!
>
> Cheers,
> Lucca Mordente
>
>
>
> On Thu, Mar 18, 2010 at 10:46 PM, Marco <marco.perg...@gmail.com> wrote:
> > What helped me was:
>
> >http://www.neilcrookes.com/2009/01/30/cakephp-site-search-with-yahoo-...
>
> > Marco
>
> > On Mar 18, 9:09 pm, Lucca Mordente <luccamorde...@gmail.com> wrote:
> > > Hello there,
>
> > > I've been trying to create a Datasource for Google Picasa, thought the
> > > documentation about this is too poor.
>
> > > Does anyone know where can I find more docs about how to implement
> > > CakePHP Datasources?
>
> > > Cheers,
> > > Lucca Mordente
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > with their CakePHP related questions.
>
> > 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+unsubscribe@googlegroups.com<cake-php%2Bunsubscribe@googlegroups.c om>For more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en
>
> > To unsubscribe from this group, send email to cake-php+
> > unsubscribegooglegroups.com or reply to this email with the words "REMOVE
> > ME" as the subject.

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

To unsubscribe, reply using "remove me" as the subject.

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
 
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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

Re: Cake 1.2.6 - Can't bake anything

Yes it is.  I have other apps not using cakephp that connect to this server correctly.  

On Wed, Mar 31, 2010 at 8:36 AM, Christian Leskowsky <christian.leskowsky@gmail.com> wrote:
Is a sql server driver included as part of a stock php install?


On Wed, Mar 31, 2010 at 9:06 AM, Jay Childers <mcfrosty@gmail.com> wrote:
<?php
class DATABASE_CONFIG {

var $default = array(
'driver' => 'mssql',
'persistent' => false,
'host' => 'xxxxxxxxxxx',
'port' => 1433,
'login' => 'xxxxxxxxxxx',
'password' => 'xxxxxxxxxxxx',
'database' => 'xxxxx',
);
}
?>

On Wed, Mar 31, 2010 at 7:18 AM, Jeremy Burns <jeremyburns@me.com> wrote:
Is it worth posting your database configuration file (with username, password and server details obscured)?

Jeremy Burns
jeremyburns@me.com


On 31 Mar 2010, at 13:17, Jay Childers wrote:

> The connection parameters are solid, the authenticAtion is solid, and theserver def. Receives remote requests. This is more a problem with the bake application itself.
>
> Sent from my iPhone
>
> On Mar 31, 2010, at 6:44 AM, Jonathon Musters <luvz2drv@gmail.com> wrote:
>
>> I would start with the connection string. Making sure that the
>> user/password has access and that even sql will allow remote
>> connection by ip (tcp/ip) and named pipe
>>
>>
>>
>> On 3/30/10, Ed Propsner <crotchfrog@gmail.com> wrote:
>>> Just checking ... I'm new to Cake as well but seen it happen all too many
>>> times with different apps where someone accidentally picks the wrong server
>>> type.
>>>
>>> On Tue, Mar 30, 2010 at 11:48 PM, Jay Childers <mcfrosty@gmail.com> wrote:
>>>
>>>> I'm using IIS and MSSQL for my servers.
>>>>
>>>>
>>>> On Tue, Mar 30, 2010 at 8:39 PM, Ed Propsner <crotchfrog@gmail.com> wrote:
>>>>
>>>>> Are you meaning to use Microsoft SQL server or MYSQL ?
>>>>>
>>>>>
>>>>> On Tue, Mar 30, 2010 at 2:53 PM, McFrosty <mcfrosty@gmail.com> wrote:
>>>>>
>>>>>> So, I'm new to Cake...that being said, I followed all the directions
>>>>>> and went through the blog tutorial, so I have a tender grasp of how
>>>>>> it's supposed to work.
>>>>>>
>>>>>> I tried baking my first application today and have met with nothing
>>>>>> but failure.  While I was able to set up the console without any
>>>>>> errors, and I was able to bake the project and set up the database
>>>>>> correctly, anytime I tried to bake the models or run 'bake all' I was
>>>>>> met with:
>>>>>>
>>>>>> Bake All
>>>>>> ---------------------------------------------------------------
>>>>>> PHP Warning:  mssql_connect(): Unable to connect: SQL Server is
>>>>>> unavailable or d
>>>>>> oes not exist.  Connection is busy. (severity 9) in C:\Inetpub\wwwroot
>>>>>> \cake12\ca
>>>>>> ke\libs\model\datasources\dbo\dbo_mssql.php on line 144
>>>>>>
>>>>>> Warning: mssql_connect(): Unable to connect: SQL Server is unavailable
>>>>>> or does n
>>>>>> ot exist.  Connection is busy. (severity 9) in C:\Inetpub\wwwroot
>>>>>> \cake12\cake\li
>>>>>> bs\model\datasources\dbo\dbo_mssql.php on line 144
>>>>>> PHP Warning:  mssql_connect(): Unable to connect to server:
>>>>>> itsql.oar.tamu.edu
>>>>>> in C:\Inetpub\wwwroot\cake12\cake\libs\model\datasources\dbo
>>>>>> \dbo_mssql.php on li
>>>>>> ne 144
>>>>>>
>>>>>> Warning: mssql_connect(): Unable to connect to server:
>>>>>> itsql.oar.tamu.edu in C:
>>>>>> \Inetpub\wwwroot\cake12\cake\libs\model\datasources\dbo\dbo_mssql.php
>>>>>> on line 14
>>>>>> 4
>>>>>> PHP Warning:  mssql_select_db(): supplied argument is not a valid MS
>>>>>> SQL-Link re
>>>>>> source in C:\Inetpub\wwwroot\cake12\cake\libs\model\datasources\dbo
>>>>>> \dbo_mssql.ph
>>>>>> p on line 151
>>>>>>
>>>>>> Warning: mssql_select_db(): supplied argument is not a valid MS SQL-
>>>>>> Link resourc
>>>>>> e in C:\Inetpub\wwwroot\cake12\cake\libs\model\datasources\dbo
>>>>>> \dbo_mssql.php on
>>>>>> line 151
>>>>>> PHP Warning:  mssql_query(): supplied argument is not a valid MS SQL-
>>>>>> Link resour
>>>>>> ce in C:\Inetpub\wwwroot\cake12\cake\libs\model\datasources\dbo
>>>>>> \dbo_mssql.php on
>>>>>> line 175
>>>>>>
>>>>>> Warning: mssql_query(): supplied argument is not a valid MS SQL-Link
>>>>>> resource in
>>>>>> C:\Inetpub\wwwroot\cake12\cake\libs\model\datasources\dbo
>>>>>> \dbo_mssql.php on line
>>>>>> 175
>>>>>> Error: Your database does not have any tables.
>>>>>>
>>>>>> I see several of these errors on the cakephp forum, with no real
>>>>>> answer.  Does anybody have a clue as to what I might be doing wrong?
>>>>>>
>>>>>> Check out the new CakePHP Questions site http://cakeqs.org and help
>>>>>> others with their CakePHP related questions.
>>>>>>
>>>>>> 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+unsubscribe@googlegroups.com<cake-php%2Bunsubscribe@googlegroups.com>For
>>>>>> more options, visit this group at
>>>>>> http://groups.google.com/group/cake-php?hl=en
>>>>>>
>>>>>> To unsubscribe, reply using "remove me" as the subject.
>>>>>>
>>>>>
>>>>> Check out the new CakePHP Questions site http://cakeqs.org and help
>>>>> others with their CakePHP related questions.
>>>>>
>>>>> 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+unsubscribe@googlegroups.com<cake-php%2Bunsubscribe@googlegroups.com>For
>>>>> more options, visit this group at
>>>>> http://groups.google.com/group/cake-php?hl=en
>>>>>
>>>>
>>>> Check out the new CakePHP Questions site http://cakeqs.org and help
>>>> others with their CakePHP related questions.
>>>>
>>>> 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+unsubscribe@googlegroups.com<cake-php%2Bunsubscribe@googlegroups.com>For
>>>> more options, visit this group at
>>>> http://groups.google.com/group/cake-php?hl=en
>>>>
>>>
>>> Check out the new CakePHP Questions site http://cakeqs.org and help others
>>> with their CakePHP related questions.
>>>
>>> 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+unsubscribe@googlegroups.com For more options, visit this group at
>>> http://groups.google.com/group/cake-php?hl=en
>>>
>>
>> --
>> Sent from my mobile device
>>
>> Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
>>
>> 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
>
> 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
>
> To unsubscribe from this group, send email to cake-php+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
 
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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en



--
-

"You can't reason people out of a position they didn't use reason to get into."

Christian Leskowsky


Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
 
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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
 
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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en