Re: Year range 1991-2031

2011-12-31 Thread Geoff Douglas
I am not sure if I understand your question exactly, but it looks like the date range for the select list allow for the dates that you need. http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html?highlight=form%20helper#datetime-options If this is the problem, then you can controller th

Re: How to "custom belongsto" in CakePHP 2?

2011-12-31 Thread Geoff Douglas
BelongsTo is simply a left join, (on the retrieval side)... I think what you are looking for is the Relationship conditions option. (Which will create the ON statement in SQL) So what you want is something that looks like... Radpostauth Model... var $belongsTo = array( 'Wdevice' => array( 'c

Re: Multiple Businesses in one database

2011-12-31 Thread Geoff Douglas
I do a very similar thing to allow users multiple profiles. So they can segregate their data by company, or family, or team. Here is the basic logic. In the appController beforeFilter() method set the logged in user to the appModel class that you are fetching. Such as... AppModel::setActiveUser

Re: Cake is NOT able to connect to the database.

2011-12-31 Thread 清水紘己
My last guess is pdo mysql is not enabled. 2012/1/1 Renato de Freitas Freire : > I had the same problem when start using cake 2.0.4 on my work, but I tried > it on my pc and it work fine. > > It might be something with your server configuration. > > I will doble check it on monday on my work. > An

Re: Cake is NOT able to connect to the database.

2011-12-31 Thread Renato de Freitas Freire
I had the same problem when start using cake 2.0.4 on my work, but I tried it on my pc and it work fine. It might be something with your server configuration. I will doble check it on monday on my work. Any news I tell you. But you can try it on other server, or try to upgrade your mysql, or som

Re: Cake is NOT able to connect to the database.

2011-12-31 Thread Ronghua
Yes, I grant all privileges to the user. Actually, if I write a php file to connect to mysql directly, I can query the result from table. '; mysql_select_db("cake_testing", $conn); $result = mysql_query("SELECT * FROM test"); while($row = mysql_fetch_array($result)) { echo $row['ref']." ".$row['co

Re: Cake is NOT able to connect to the database.

2011-12-31 Thread 清水紘己
Did you have done GRANT it? 2012/1/1 Ronghua : > I also tried my root login configuration, but it doesn't work as well. > > On 1月1日, 上午1时51分, "Timothy O'Reilly" > wrote: >> I'm sure you have tried it, but have you tried Login "Root" and Password >> "Root"? >> Regards, >> Tim >> >> >> >> >> >> >>

CakeRequest is('mobile'): Solved

2011-12-31 Thread GB
I replaced the CakeRequest::is format with $this->request->is and all worked as prescribed. Ignore last post. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP

CakeRequest is('mobile')

2011-12-31 Thread GB
I am having trouble getting the CakeRequest::is('mobile') function to work for iPad and Android devices. I scoured existing documentation/ groups with no luck. Basically if is a mobile browser I want to view CSS slightly differently, only slight changes thats why I did not go to separate view fil

Re: Cake is NOT able to connect to the database.

2011-12-31 Thread Ronghua
I also tried my root login configuration, but it doesn't work as well. On 1月1日, 上午1时51分, "Timothy O'Reilly" wrote: > I'm sure you have tried it, but have you tried Login "Root" and Password > "Root"? > Regards, > Tim > > > > > > > > On Sat, Dec 31, 2011 at 2:59 AM, Ronghua wrote: > > Hi, today i

Re: Cake is NOT able to connect to the database.

2011-12-31 Thread Ronghua
I tried this as well, created database as you mentioned below with testuser, change the configure file as below. But the result is same as below, still can't connect to DB. 'Database/Mysql', 'persistent' => false, 'host' => 'localhost', 'login' => 'testuser',

Re: CakePHP and a normalized database

2011-12-31 Thread Sam Sherlock
if you read book.cakephp.org find answers to these questions and more. see the blog tutorial but start reading from the beginning On 31 December 2011 18:03, lcano wrote: > Clint,Thanks a lot! Your code worked and now I am able to retrieve > information from different tables within the User mo

Re: CakePHP and a normalized database

2011-12-31 Thread lcano
Clint,Thanks a lot! Your code worked and now I am able to retrieve information from different tables within the User model. Now, my next question would be. How would inserting data work? Does cakephp take care of that automatically as well? Thanks, Luis On Dec 30, 7:56 pm, Clint wrote: > Hi, the f

Re: Cake is NOT able to connect to the database.

2011-12-31 Thread Timothy O'Reilly
That is a much better suggestion :) On Sat, Dec 31, 2011 at 9:49 AM, Sam Sherlock wrote: > because this is blank > > 'database' => '', > > what is the name of the mysql database your connecting to? > > mysql -u testuser -p123456 -h localhost > mysql>CREATE DATABASE cake_testing; > mysql>exit;

Re: Cake is NOT able to connect to the database.

2011-12-31 Thread Timothy O'Reilly
I'm sure you have tried it, but have you tried Login "Root" and Password "Root"? Regards, Tim On Sat, Dec 31, 2011 at 2:59 AM, Ronghua wrote: > Hi, today is first day I'm using cake. I have setup CakePHP 2.0.4. In > \app\Config\database.php, the configuration is as below > > class DATABASE_CONF

Re: Cake is NOT able to connect to the database.

2011-12-31 Thread Sam Sherlock
because this is blank 'database' => '', what is the name of the mysql database your connecting to? mysql -u testuser -p123456 -h localhost mysql>CREATE DATABASE cake_testing; mysql>exit; then use 'database' => 'cake_testing', -- Our newest site for the community: CakePHP Video Tutorials ht

Re: Cake optimization

2011-12-31 Thread John Hardy
Use a dedicated memcached server for your caching. On Dec 31, 2011, at 8:59 AM, Phang Mulianto wrote: > you should also consider to optimize your web server and os layer, javascript > caching in your app and also the image caching in user browser...it will make > a difference for the effort...

Re: how to connect database

2011-12-31 Thread Thiago Belem
This question isn't related to CakePHP framework, please check the PHP (language) documentation at *PHP.net* -- Thiago Belem, Desenvolvedor WEB Enviado do meu Android Em 31/12/2011 14:42, "paresh kotar" escreveu: > I am a learner in php..I have basic knowledge of HTML and C Language. > I want t

Re: Cake optimization

2011-12-31 Thread Phang Mulianto
you should also consider to optimize your web server and os layer, javascript caching in your app and also the image caching in user browser...it will make a difference for the effort... what's your expect in load time results? On Dec 31, 2011 4:45 AM, "Dee Johnson" wrote: > Hi guys. > > I have

Cake is NOT able to connect to the database.

2011-12-31 Thread Ronghua
Hi, today is first day I'm using cake. I have setup CakePHP 2.0.4. In \app\Config\database.php, the configuration is as below 'Database/Mysql', 'persistent' => false, 'host' => 'localhost', 'login' => 'testuser', 'password' => '123456', '

Re: Multiple Businesses in one database

2011-12-31 Thread cakebrother
function index() { $this->Event->recursive = 1; $this->set('events', $this->paginate()); } Can you help me add the find() to the code above. I have a user_id field I'd like to filter on. Thank You -- View this message in context: http://cakephp.104

how to connect database

2011-12-31 Thread paresh kotar
I am a learner in php..I have basic knowledge of HTML and C Language. I want to know how to connect database. In PHP using MS SQL. Paresh Kotar. Ranghola(dist : Bhavnagar , Ta : Umrala, Country : India) 9510411431 -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.o

Re: get current url as array

2011-12-31 Thread euromark
I am talking about the complete array to be passed to Html::url() / Html::link() of course there are tons of ways to get the data itself just saw today: Router::parse($this->request->here(false)); besides 10 other ways. but you would either have to manually join them: array('controller'=>$this->pa

Re: get current url as array

2011-12-31 Thread mike karthauser
You should be able to get the data you need in $this->params. Mike Karthauser Brightstorm limited Tel: 07939252144 On 31 Dec 2011, at 12:01, euromark wrote: > any feedback? > seems like this is a missing functionality. > > example: > admin/authplugin/users/edit/2 > > I would expect to find so

Re: get current url as array

2011-12-31 Thread euromark
any feedback? seems like this is a missing functionality. example: admin/authplugin/users/edit/2 I would expect to find some router method to get $url = array( 'admin' => 1 'plugin' => 'authplugin' 'controller' => 'users' 'action' => 'edit' 2 ) for example maybe with Router::

Re: DebugKit Toolbar - core processing (derived)

2011-12-31 Thread majna
Turn debug off, check if Cake caches files in app/tmp -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send