Re: checking if Save() method was successful...

2011-10-09 Thread euromark
i cant follow you wants your problem? if ($result) {} works as expected in your case NOT EMPTY ARRAY equals FALSE therefore you already have a valid check if the saving succeeded On 9 Okt., 11:48, Tomfox Wiranata wrote: > hello andrewperk, > > thanks for your help. i appreciate that. one que

Loading Classes

2011-10-09 Thread CrotchFrog
I'm a bit confused in the proper use of App::import() vs. App::uses() in migrating to 2.0. I'm try to load the Facebook php sdk from the Vendor folder as I used to in 1.3. In 1.3 what worked for me was : App::import('Vendor', 'facebook) function __construct(){ parent::__construct();

Re: checking if Save() method was successful...

2011-10-09 Thread Tomfox Wiranata
hello andrewperk, thanks for your help. i appreciate that. one question though: what do i have to do to get a false? because when i use made up database fields i still get a filled array as a return. so in that case the saving failed and i still dont get a false. is there maybe another way t

Re: Ajax Link - How to exchange/toogle a link?

2011-10-09 Thread Zaky Katalan-Ezra
#my_profile is the link id. function follow(add) { var data = "data[User][id]="+$("#foloweeId").val(); var actionurl = "/users/users/setFollow"; if(add == 0){ var actionurl = "/users/users/unsetFollow"; } $.ajax({ type: "post",// Request me

Re: hasAndBelongsToMany does not work

2011-10-09 Thread Zaky Katalan-Ezra
Provide the models code On Fri, Oct 7, 2011 at 11:26 PM, khalili merouane < merouane.khal...@gmail.com> wrote: > Hello, > > I have two tables categories and products when I try to view a > category, I just have the information in the category without > products. > > When I check the applications