# |
Aug 9th 2008, 08:29 |
francky06l |
cpierce_: if its a new project you should go for 1.2 .. 1.1 is end of life .. |
# |
Aug 9th 2008, 08:28 |
francky06l |
cpierce_: I guess find in 1.1 is as find('first' in 1.2 ... But AD7six suggestion is better (did not remember the neigbors in 1.1) |
# |
Aug 9th 2008, 08:28 |
cpierce_ |
i'm saying for future projects is 1.2 easy too? |
# |
Aug 9th 2008, 08:28 |
cpierce_ |
i really like how 1.1 works |
# |
Aug 9th 2008, 08:28 |
AD7six |
y |
# |
Aug 9th 2008, 08:27 |
cpierce_ |
should i go ahead and go to 1.2 |
# |
Aug 9th 2008, 08:27 |
cpierce_ |
i'm just starting out |
# |
Aug 9th 2008, 08:27 |
cpierce_ |
francky06l: oh i see what you are saying and then do limit 1 to only get the 1 result... |
# |
Aug 9th 2008, 08:26 |
AD7six |
in 1.1. findNeighbours |
# |
Aug 9th 2008, 08:26 |
francky06l |
cpierce_: I do not remember much of cake 1.1 but something as $this->Model->find(array('id > '.$last_id)), should do it ..You would have to pass the last_id along with your ajax call |
# |
Aug 9th 2008, 08:25 |
AD7six |
cpierce_: see find('neighbors' |
# |
Aug 9th 2008, 08:25 |
francky06l |
cpierce_: well ..no what would be next except it could be > last_id |
# |
Aug 9th 2008, 08:24 |
cpierce_ |
could i not use some kind of ->next do do that? |
# |
Aug 9th 2008, 08:24 |
cpierce_ |
yes |
# |
Aug 9th 2008, 08:24 |
francky06l |
cpierce_: your table is ordered by id initially ... |
# |
Aug 9th 2008, 08:23 |
francky06l |
cpierce_: condition is id > last_id and limit 1 ... Of course you need to pass the last id |
# |
Aug 9th 2008, 08:23 |
cpierce_ |
not sure i follow franchy |
# |
Aug 9th 2008, 08:23 |
francky06l |
cpierce_: you can use the id as condition (ie: last id) ... and limit 1 |
# |
Aug 9th 2008, 08:22 |
cpierce_ |
and if 100 in there i want to do the same with the whole 100 |
# |
Aug 9th 2008, 08:22 |
cpierce_ |
say there are 3 fields in the database i want to pull 1, then 2, then 3, then 1 again |
# |
Aug 9th 2008, 08:21 |
cpierce_ |
i'm gonna use ajax to do it obviously |
# |
Aug 9th 2008, 08:21 |
cpierce_ |
then the next 10 seconds later ...etc |
# |
Aug 9th 2008, 08:21 |
cpierce_ |
and i want to load one article |
# |
Aug 9th 2008, 08:21 |
cpierce_ |
yes but i'm pulling news |
# |
Aug 9th 2008, 08:21 |
francky06l |
cpierce_: you mean a kind of pagination ? |
# |
Aug 9th 2008, 08:20 |
cpierce_ |
and kinda walk the table then start over? |
# |
Aug 9th 2008, 08:20 |
cpierce_ |
is there a way in cake 1.1 to get one result and then the next get the next result in the table? |
# |
Aug 9th 2008, 08:11 |
[TSK] |
BBL |
# |
Aug 9th 2008, 08:11 |
Wisp |
omg...... thx ))) |
# |
Aug 9th 2008, 08:10 |
francky06l |
Wisp: you have 2 model "Good" and "Goods" (note the plural) ? |
# |
Aug 9th 2008, 08:09 |
Wisp |
why is that ? |
# |
Aug 9th 2008, 08:09 |
Wisp |
i have this and cakephp error when $data = $this->Category->find('all', array('contain' =>array('Goods'=>'Currency'))); Model "Goods" is not associated with model "Currency" |
# |
Aug 9th 2008, 08:08 |
[TSK] |
ACTION is a nervous-Nellie web designer. He's seen his logfiles... ;) |
# |
Aug 9th 2008, 08:08 |
TheBig |
I always use to go to the bakery early in the morning, I always find fresh brioches :) |
# |
Aug 9th 2008, 08:08 |
Wisp |
http://bin.cakephp.org/view/1951625533 |
# |
Aug 9th 2008, 08:07 |
TheBig |
right, I'll check it... |
# |
Aug 9th 2008, 08:07 |
[TSK] |
lqdice__: Indeed. I don't just check the ID. I tend to lean to the paranoid side and check EVERYTHING which might be risky, and aye. I do use the security component. Like it a lot. :) |
# |
Aug 9th 2008, 08:07 |
lqdice__ |
TheBig: ok that method can work then .. there is also a wizard component in the bakery if you are doing step-by-step forms and things like that |
# |
Aug 9th 2008, 08:06 |
lqdice__ |
[TSK]: just remember you should always check the ID to make sure its valid if you are doing something like users editing something that is access protected.. cause ppl can in the add form inject an ID and force an edit.. what you can do to prevent this is also using security component (which can be a pain but makes your forms secure) |
# |
Aug 9th 2008, 08:06 |
TheBig |
I've a user registration form, in case of success of registration you go to a page which contains a form for inviting people by mail |
# |
Aug 9th 2008, 08:06 |
Wisp |
hello all |