Re: Posting to two different tables in mySQL

2007-10-14 Thread afx
Helpful, thanks! On Oct 13, 5:19 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > For each of the 2 tables you should have one model. > Then in the controller todos_controller.php you set the class property > $uses to: > > var $uses = array('Todolist, 'Todoset'); > > This gives you the power

Re: want cake php tutorial

2007-10-14 Thread manuj bansal
one is wel known www.manual.cakephp.org another is http://www.ibm.com/developerworks/opensource/edu/os-dw-os-php-cake1.html On Oct 14, 8:17 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > can some buddy give me good tutorial of cake php > plz give me i am want to work with cake php an i do

Re: some actions before controller and model construct

2007-10-14 Thread Grant Cox
What kind of functionality are you looking at, and why does it have to be before the model construct? You might be able to do it in the controller construct()... On Oct 15, 11:57 am, vg2k <[EMAIL PROTECTED]> wrote: > Where put some actions which work with DB, all includes (like db) at > that mo

Re: Sending a file via Cake

2007-10-14 Thread Langdon Stevenson
Hi Grant Thanks for the reply. The example you sent was spot on. It did exactly what I wanted. Thanks also for the reminder about the debug output, I had forgotten that and it was causing a problem. System is all working nicely now. Files are safely inaccessible to all but those who the s

Re: Eclipse code completion in Views

2007-10-14 Thread Mandy
I use Easy Eclipse for PHP. I created eclipse_helper.php, copied all of the above and pasted it in the file. Then placed the file in webroot folder, did a Project->Clean->Build (made sure .thtml files are opened by PHP editor). However, I still couldn't see code completion when I typed $html-> (a

Re: Wow. I must really have missed something.

2007-10-14 Thread nate
I'm pretty sure most of that shouldn't have actually worked in almost any version of 1.2, let alone revision 5427. See here: http://cake.insertdesignhere.com/posts/view/15, that's how it's done. On Oct 14, 9:14 pm, ard <[EMAIL PROTECTED]> wrote: > I watch this group quite carefully, but this rea

Re: $scripts_for_layout isn't functioning...

2007-10-14 Thread chad
you probably already figured this out, but I was searching for a term similar to yours and noticed you were missing "echo" before your $javascript->link Should be link('js_insert', false); ?> On Sep 25, 12:03 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Also, I *am* using the Javascript

some actions before controller and model construct

2007-10-14 Thread vg2k
Where put some actions which work with DB, all includes (like db) at that moment must be included, but controller action and model construct do not start at this moment. bootstrap.php is too early (not db class at this moment) Controller::beforeFilter is too late... --~--~-~--~~--

Re: Simple query help with a compound condition

2007-10-14 Thread MikeK
Thanks francky, that did the trick! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMA

Wow. I must really have missed something.

2007-10-14 Thread ard
I watch this group quite carefully, but this really surprised me. I have been developing on 1.2.0.5427alpha and everything works well for me. Today I tried 1.2.0.5750 and everything broke. Here is just one example. Under 5427 this code. create('/users',array('action'=>'login'))."\n"; ?> in

Re: Sending a file via Cake

2007-10-14 Thread Grant Cox
The only problem will be that if you do not sent the appropriate content type headers, then the browser will not know what to do with the big chunk of binary data you spit out - is this an image, a word document, a html page? Should it try to save this data, or display it inline? http://au3.php.

Re: missing database table / camelcase error

2007-10-14 Thread Adam D
Ugh. To document my own ineptitude... The issue was that the new server had the site defaulted to php4. An argument for setting $name properly, I suppose. - Adam On Oct 14, 8:26 pm, Adam D <[EMAIL PROTECTED]> wrote: > Hi, > > I just moved my site to a new server and I'm getting a "missing > data

Re: missing database table / camelcase error

2007-10-14 Thread Grant Cox
Are you using PHP4 on the live server? Are you forgetting to have var $name = 'GroupType' at the top of your models? PHP4 cannot get a case sensitive version of a class name - so when it looks at your model it assumes it to be "Groupttype", unless you have a var $name with the correct case. On

Sending a file via Cake

2007-10-14 Thread Langdon Stevenson
I have a set of files stored in a protected directory on my project's server. I need my Cake app to send files to users, however due to security reasons, I can't just use a redirect that points the web browser to the appropriate file. My code takes a parameter from the submitted URL, checks i

missing database table / camelcase error

2007-10-14 Thread Adam D
Hi, I just moved my site to a new server and I'm getting a "missing database error" for all of my model. Cake appears to be omitting the underscores on the conversion from model name to database table, so, for a model like GroupType, it's looking for a table named "grouptypes" instead of "group_t

problems with validation

2007-10-14 Thread d34db0lts
Hey guys, i have this little app that i'm having problems with. the index page lists all the records but in that same index page there is a form that uses function add in the controller to process the form, but my problem is that i need a way to display if the user forgot to enter anything in the

Re: Cakephp - generating excel files.

2007-10-14 Thread Grant Cox
I didn't follow the actual links before - yes it is #3. I don't recall us having any problems getting it working, other than large files being corrupted when using version 8. But then we did extend the helper a little for other reasons, so perhaps that also fixed some issues? Send me a direct e

Re: How to specify components in a subfolder

2007-10-14 Thread Steve Boyd
I'd say for the sake of simplicity you might as well just combined all your components into a single file since I'm guessing if you are using 1 you'll end up using most of the others. Since you're only including 1 file instead of several small files chances are it'll actually run slightly faster

Re: How to specify components in a subfolder

2007-10-14 Thread nate
Nope. On Oct 14, 7:40 am, zonium <[EMAIL PROTECTED]> wrote: > I've used $components = array ('ComponentA, ComponentB, ComponentC, > ComponentD, ComponentE, ComponentF') to tell the controller that I > need the ComponentA, B, C, D, E and F". > > Now I want to move these components into a folder n

Re: New to CakePHP and PHP

2007-10-14 Thread tracyfloyd
Checkout any of the Larry Ullman books on PHP... The Visual Quickstart Guides are great. That's where I got my start with PHP and he does a great job of laying everything out in a way thats understandable (IMO). On Oct 13, 7:08 pm, afx <[EMAIL PROTECTED]> wrote: > I'm in the same boat as you, e

Re: Emitting a PNG

2007-10-14 Thread MikeK
I am still struggling with this dadgumit -- there is nothing wrong with the img generated itself -- I just can't emit it without saving it to a file with the Header command if anything else is on the page. --~--~-~--~~~---~--~~ You received this message because y

Error when baking a new project with CakePHP 1.2

2007-10-14 Thread Martin
Hello all, I have a problem to create a new CakePHP 1.2 project. Below are the commands that I use. > cake bake project www/test So far, so good! If I go the address http://localhost/test, I get the nice welcome screen telling me that I should configure my database. So I go back to the command p

Captcha Problem

2007-10-14 Thread [EMAIL PROTECTED]
I tried implementing the Captcha component with PhpCaptcha and I'm using CakePHP 1.2alpha and PHP 5.x. Its giving something like "X" output for the captcha image in IE and Firefox. On my controlller i have this: class UsersController extends AppController { var $name = "Users"; v

Re: Pagination for model with association (cake 1.1)

2007-10-14 Thread Alpha
Thanks All~ Finally I get it done ^o^ 1> get catid from category model 2> find products with catid condition from product model 3> do pagination i product model That's it ! Many Thanks Andy --~--~-~--~~~---~--~~ You received this message because you are subs

want cake php tutorial

2007-10-14 Thread [EMAIL PROTECTED]
can some buddy give me good tutorial of cake php plz give me i am want to work with cake php an i don't know anything abt it. plz.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group.

How to specify components in a subfolder

2007-10-14 Thread zonium
I've used $components = array ('ComponentA, ComponentB, ComponentC, ComponentD, ComponentE, ComponentF') to tell the controller that I need the ComponentA, B, C, D, E and F". Now I want to move these components into a folder named ABCDE (inside the standard 'components' folder) because these com

Re: How to delete multiple rows from a single table

2007-10-14 Thread nate
Cake 1.1 has no facilities for deleting multiple records in a single query, other than the query() method. On Oct 13, 9:36 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Well .. duhhh of course ... > But i wanted to use cake's db abstration layer and model features... > because if i wa

Re: Emitting a PNG

2007-10-14 Thread AD7six
On Oct 14, 1:39 am, MikeK <[EMAIL PROTECTED]> wrote: > Well I think I get it -- I can't use Header so I HAVE to put it in a > tmp file? Confirmation appreciated. Why would you be unable to use header. Look at the source for your image, there is probably an error in it. hth, AD --~--~---

Re: Simple query help with a compound condition

2007-10-14 Thread francky06l
try conditions = array('AND' => array("Obj.length" => '>=6'), "Obj.length' => '<=13'))) On Oct 14, 4:29 am, MikeK <[EMAIL PROTECTED]> wrote: > Can soeone please show me how to code this condition? 3 <= length <= > 13 > > conditions = array("Obj.length" => '>=6', "Obj.length' => '<=13'); > > Only

Re: problems with $html->link in cakephp 1.2 alpha

2007-10-14 Thread francky06l
It seems you do not use mod-rewrite for you cake11 links. Be sure to have the .htaccess in the webroot and comment this line in the config/ core.php : // define ('BASE_URL', env('SCRIPT_NAME')); Cake12 should work the same On Oct 14, 6:50 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > hi,