Re: Theory again - mysql_query("INSERT INTO table...

2007-09-28 Thread Conrad
In other words, if you don't pass a 'id', or pass 'id' = null, it will do an insert, otherwise if there is a non-null value for id it will update. ??? Conrad On Sep 29, 12:25 am, AD7six <[EMAIL PROTECTED]> wrote: > On Sep 29, 7:30 am, Conrad <[EMAIL PROTECTED]> wrote: > > > I am not finding the

Re: Theory again - mysql_query("INSERT INTO table...

2007-09-28 Thread AD7six
On Sep 29, 7:30 am, Conrad <[EMAIL PROTECTED]> wrote: > I am not finding the logic in doing the equiv. of an INSERT query. > > I am not seeing how "$this->Model->save($this->data) knows which it > is, an insert or an update. > > Can anyone spell it out for me, Sometimes I think I am somewhat sim

Re: Another HABTM self referencing question - cannot save data?

2007-09-28 Thread AD7six
On Sep 28, 11:36 pm, red <[EMAIL PROTECTED]> wrote: > Hello everybody! > I want to make something similliar to friend list, so I used self > referencing HABTM - users_users. > > The tables are: > users (id, friend_id, bla bla bla) - pk (id, friend_id) // > and id of course == friend_id

Re: Newbie, slow response, wrong tools ?

2007-09-28 Thread AD7six
On Sep 28, 10:09 pm, Phil <[EMAIL PROTECTED]> wrote: > Newbie, slow response, wrong tools ? > > I use ms access to run a small business and have decided to replace my > app with > linux, apache2, postgres 8., cakephp 1.2 > > so far i have got as far as adapting the bookmarks tutorial by graham >

Re: Why is "findAll()" not reading one field

2007-09-28 Thread AD7six
On Sep 29, 6:57 am, Conrad <[EMAIL PROTECTED]> wrote: > I have a table that is filled by program. This table contains field > named "check_num" that contains data in the table, but is not being > read out. > > $result = $this->Dailypay->findAll(); > > $this->set('row',$result);

Re: Unclear as to Path Settings on Cake Install

2007-09-28 Thread AD7six
On Sep 28, 10:15 pm, CakeONaut <[EMAIL PROTECTED]> wrote: > Hi! > > I am using a Linux host and I'm putting a plain vanilla install of the > latest stable Cake here: > > '/home/net4/public_html/tst/wwwroot/cake' and the app is in the same > place: '/home/net4/public_html/tst/wwwroot/app' > > I h

Re: Doing INNER JOIN with Cake's relationships

2007-09-28 Thread AD7six
On Sep 28, 2:06 am, neromir <[EMAIL PROTECTED]> wrote: > Hi, > > I've got a few tables that I'm trying to join using Cake's built in > relationship setup. I have a users table, comments table, and comment > type table. I'm trying to show all of the comments to a moderator and > as such have se

Why is "findAll()" not reading one field

2007-09-28 Thread Conrad
I have a table that is filled by program. This table contains field named "check_num" that contains data in the table, but is not being read out. $result = $this->Dailypay->findAll(); $this->set('row',$result); This returns the following: (only one record displayed) Array (

Theory again - mysql_query("INSERT INTO table...

2007-09-28 Thread Conrad
I am not finding the logic in doing the equiv. of an INSERT query. I am not seeing how "$this->Model->save($this->data) knows which it is, an insert or an update. Can anyone spell it out for me, Sometimes I think I am somewhat simple minded. Conrad --~--~-~--~~~---

Re: helper or html tag ?

2007-09-28 Thread FallenJehova
Hi, If your designer knows css, I would recommend using the htmlhelper. It's is very simple and fast to use for you, and as all elements are styleable, he'll would have no problem working with them. I am one of those who thinks that php is already a template language and smarty's features does

RE: helper or html tag ?

2007-09-28 Thread Mariano Iglesias
Oh so you *do* have a brain :) Sorry, this is the Pinot Noir talking -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http

RE: Deprecated helpers in 1.2.0.5427alpha

2007-09-28 Thread Mariano Iglesias
It is not only much better, it makes you feel like: how on earth could I work before CakePHP 1.2's FormHelper? Nothing nicer than: create('User', array('action' => 'add')); ?> input('User.name'); ?> input('User.password'); ?> input('User.email', array('error' => array(

Re: How to pass a variable from Controller to Layout?

2007-09-28 Thread bingo
hi Raymond, have you thought about using elements. In your views, you can call elements and elements can either request controller or use cache to get specific details Ritesh On Sep 28, 10:03 pm, Raymond <[EMAIL PROTECTED]> wrote: > Let's say we have a layout as /app/views/layout/mylayout.thtml

Re: Newbie, slow response, wrong tools ?

2007-09-28 Thread [EMAIL PROTECTED]
Hi Phil, The problem isn't the amount of records, it's that you're trying to display too many results on a single page at the same time. For this, there is pagination. Read this on how to integrate pagination into your app: http://bakery.cakephp.org/articles/view/advanced-pagination-1-2 Kevin,

Re: helper or html tag ?

2007-09-28 Thread Chris Hartjes
On 9/28/07, Adwin Wijaya <[EMAIL PROTECTED]> wrote: > > Hi, > > for you, who are playing with cakephp for quite long, are you using > htmlhelper or just use plain html code or smarty ? > > i myself, get used with smarty for about 3 years and my web designer > is get used with it (he just know how

How to pass a variable from Controller to Layout?

2007-09-28 Thread Raymond
Let's say we have a layout as /app/views/layout/mylayout.thtml. We want to display different content (besides the content of invoked action) according to current controller/action with the very same layout. For example if post/add action is invoked, a component named 'instruction' is rendered; whi

helper or html tag ?

2007-09-28 Thread Adwin Wijaya
Hi, for you, who are playing with cakephp for quite long, are you using htmlhelper or just use plain html code or smarty ? i myself, get used with smarty for about 3 years and my web designer is get used with it (he just know how to do html and css, no idea about scripting). can you give me th

Re: Deprecated helpers in 1.2.0.5427alpha

2007-09-28 Thread Chris Hartjes
On 9/28/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > Newbie asks. > Why does the newest (I downloaded it today) version use deprecated > helpers? They are deprecated because they want you to use the Form helper instead of the HTML helper. FormHelper is *much* better than the old HTML he

Deprecated helpers in 1.2.0.5427alpha

2007-09-28 Thread [EMAIL PROTECTED]
Newbie asks. Why does the newest (I downloaded it today) version use deprecated helpers? Notice: Method input() is deprecated in HtmlHelper: see FormHelper::input or FormHelper::text in /app/web/dev/cake/cake/libs/ view/helpers/html.php on line 608 Notice: Method password() is deprecated in Ht

Re: Unclear as to Path Settings on Cake Install

2007-09-28 Thread Sam Sherlock
__FILE__ is a php constant http://www.php.net/constants Have you read http://manual.cakephp.org/chapter/installing - S On 28/09/2007, CakeONaut <[EMAIL PROTECTED]> wrote: > > > Hi! > > I am using a Linux host and I'm putting a plain vanilla install of the > latest stable Cake here: > > '/home/net

Dynamically determining connection information

2007-09-28 Thread Olexandr Melnyk
Hello, For one of web applications I'm working on, I need to implement clustering on application level. Basically, there is a table of users, which contains information about server where data of specific user is located. I have models, eg. UserPost, which represent tables of a specific user. Wh

Another HABTM self referencing question - cannot save data?

2007-09-28 Thread red
Hello everybody! I want to make something similliar to friend list, so I used self referencing HABTM - users_users. The tables are: users (id, friend_id, bla bla bla) - pk (id, friend_id) // and id of course == friend_id users_users (user_id, friend_id)- pk (user_id, friend_i

Any available Toronto bakers?

2007-09-28 Thread cake.developer
Are there any developers out there who are available for Cake projects in Toronto? Drop me a line. ([EMAIL PROTECTED]). Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group

Newbie, slow response, wrong tools ?

2007-09-28 Thread Phil
Newbie, slow response, wrong tools ? I use ms access to run a small business and have decided to replace my app with linux, apache2, postgres 8., cakephp 1.2 so far i have got as far as adapting the bookmarks tutorial by graham bird http://grahambird.co.uk/cake/tutorials/scaffolding.php The pro

Unclear as to Path Settings on Cake Install

2007-09-28 Thread CakeONaut
Hi! I am using a Linux host and I'm putting a plain vanilla install of the latest stable Cake here: '/home/net4/public_html/tst/wwwroot/cake' and the app is in the same place: '/home/net4/public_html/tst/wwwroot/app' I have discovered that I absolutely do not understand what the following are a

Path Confusion in setting up Cake

2007-09-28 Thread CakeONaut
Hi! I am using a Linux host and I'm putting a plain vanilla install of the latest Cake here: '/home/net4/public_html/tst/wwwroot/cake' and the app is in the same place: '/home/net4/public_html/tst/wwwroot/app' I have discovered that I absolutely do not understand what the following are and h

1.2 Console Question

2007-09-28 Thread Brandon
I want to call a controller action via the command line using the Cake console. I can call (this is a linux box) bash-2.03# ./cake -app ../../atm_dev and it returns the various paths that are set as well as the available shells: extract api acl console bake Unfortunately, in playing with these sh

Re: catch all action

2007-09-28 Thread cakeFreak
Hey carSign, maybe there is a better way using regexpressions, but way in you controller index() function you don't explode the uri? In the ruter set - Router::connect('/videos/*', array('controller' => 'videos', 'action' => 'in

catch all action

2007-09-28 Thread carSign
Is there such a thing as some kind of catch all action - or good way to handle when a user mistyps the url? for example if I have http://www.example.com/videos/rent/5124/0-235253 and a user types 'reny' instead of 'rent' like http://www.example.com/videos/renr/5124/0-235253 is there some kind

Dumb newbie question: Are baked sample tests supposed to pass?

2007-09-28 Thread Philip
I'm just getting started with the testing infrastructure in CakePHP 1.2.It was a little rough getting started, because few people seemed to be able to point me to any sort of canonical documentation, but thanks to http://cakebaker.42dh.com/2007/03/23/how-to-use-the-official-cakephp-test-suite

Re: Easy way to deal with enum's?

2007-09-28 Thread lucaspirola
after some changes, its working fine... function getEnumValues($columnName=null) { if ($columnName==null) { //no field specified,return empty set return array(); } //Th

Re: Cake 1.2 Cache Problem - Submitting a Form doesn't Reset Cache

2007-09-28 Thread Baz
Ok, cool. Just making sure that I wasn't doing something stupid here (as is usually the case). I guess I'll just list the controllers that I do want to cacheor do a $this->cacheAction = false; in those I don't want to cache? Either way, I love caching - server's kinda slow. On 9/28/07, guita

Re: Easy way to deal with enum's?

2007-09-28 Thread guitarclap
For boolean fields tinyint(1) works great! A while back, I ran into situations where ENUM was the best way to go so I created the Enumerable behavior. http://bin.cakephp.org/view/513331644 Not sure if it still works or not (haven't tested it in a while). It stores the integer representation of

Re: create subdomain.

2007-09-28 Thread guitarclap
If you are using Windows as your local dev environment this I am pretty sure this is impossible. Windows can't handle local wildcards in hosts (windows\system32\drivers \etc\hosts) (Won't work) 127.0.0.1 *.site.local (Will work) 127.0.0.1 sub1.site.local 127.0.0.1 sub2.site.local You will also

Re: Cake 1.2 Cache Problem - Submitting a Form doesn't Reset Cache

2007-09-28 Thread guitarclap
I ran into a similar situation when I tried to cache a login page; when the form was submitted it would just simply show the same view again. I am pretty sure that this is by design - or fixed in the svn (somewhere). If you check out the file in /tmp/cache/views/ you will see why - cake caches t

Missing adodb.inc.php File?

2007-09-28 Thread Cory Dee
Apparantly, when I installed Cake, an include file was missed. Error as follows: Warning: vendor(E:\Sites\OPL\2008\cake\vendors\adodb\adodb.inc.php): failed to open stream: No such file or directory in E:\Sites\OPL \2008\cake\cake\basics.php on line 536 Fatal error: vendor(): Failed opening requ

Re: CONNECT MS ACCESS DATABASE

2007-09-28 Thread RichardAtHome
Do you have the Access database open in Access when you try to connect to it through PHP? Been a while since I've done anything with Access but I do remember that used to be a problem. Close down access, then run your cake app. Also, just to save yourself some headaches down the line: Access ge

Re: create subdomain.

2007-09-28 Thread Adwin Wijaya
Grant Cox wrote: > What you want is a wildcard subdomain. Register in DNS > *.yourdomain.com, and handle the same in your webserver, pointing to > your cake app. > > Then the first step in your app (in beforeFilter) should be to look at > the env('HTTP_HOST') to determine if the subdomain reques

Cake 1.2 Cache Problem - Submitting a Form doesn't Reset Cache

2007-09-28 Thread Baz
I'm having a sort of stupid problem. I've searched for a resolution, but I don't see anyone reporting the same issues. Maybe I'm doing something wrong. I'm using Cake's cache and I'm trying to Cache the whole controller. var $cacheAction = '+1 hour'; However, Cake now refuses to accept any for

Re: Starting with Non-Standard DB Conventions

2007-09-28 Thread Cory Dee
Ahhh, thank you so much! On Sep 28, 9:06 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On 9/28/07, Cory Dee <[EMAIL PROTECTED]> wrote: > > > > > I had a feeling that there was going to be an "easier" way to do > > things. > > > The problem is, is that I'm not aware of any way to specify the >

Re: Starting with Non-Standard DB Conventions

2007-09-28 Thread Chris Hartjes
On 9/28/07, Cory Dee <[EMAIL PROTECTED]> wrote: > > I had a feeling that there was going to be an "easier" way to do > things. > > The problem is, is that I'm not aware of any way to specify the > table's name. The below code still returns "No Database table for > model Book (expected "books"), cr

Re: Starting with Non-Standard DB Conventions

2007-09-28 Thread Cory Dee
I had a feeling that there was going to be an "easier" way to do things. The problem is, is that I'm not aware of any way to specify the table's name. The below code still returns "No Database table for model Book (expected "books"), create it first.", as the table is called "bib", rather than "b

Re: Best way to handle "GUESTS" with ACL and groups

2007-09-28 Thread Geoff Ford
I usually have the "Guest" or "Public" group at the root of the tree as they usually have the bare minimum access rights. All subsequent groups just extend the base permission set. And how you describe identifying a guest user is pretty much what I do - if they are not logged in I set them as a

CONNECT MS ACCESS DATABASE

2007-09-28 Thread kaki
Hi, I´m trying to connect to a MS Access Database , i've written this in my 'database.php' var $default = array('driver' => 'adodb', 'connect' => 'access', 'host' => 'Driver={Microsoft Access Driver(*.mdb)};Dbq=D:\bd1.mdb; ',

Best way to handle "GUESTS" with ACL and groups

2007-09-28 Thread cakeFreak
Hey guys I was just wondering what is the best way to handle "Guests" woth ACL. Let's say I have my Groups as follows: - Admin - Editors - Users - Guests I was thinking to do something like this in a beforeFilter function in my AppController ---