# |
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 |
# |
Aug 9th 2008, 08:05 |
lqdice__ |
im asking what you are doing because you are probably reinventing the wheel |
# |
Aug 9th 2008, 08:05 |
lqdice__ |
TheBig: are you making like a wizard? |
# |
Aug 9th 2008, 08:05 |
TheBig |
and then check (and unset) at the second page... |
# |
Aug 9th 2008, 08:05 |
kamalcom |
yes, the difference, is that the edit view contain a hidden input named id |
# |
Aug 9th 2008, 08:04 |
TheBig |
lqdice__, it works fine, in user register, i make $this->Session->write('invite.allow', true'); |
# |
Aug 9th 2008, 08:04 |
[TSK] |
lqdice__: Ah. So, it WAS as simple as I'd thought, just not the exact means to go about it that I had thought from looking at the API docs. TYVM. :) |
# |
Aug 9th 2008, 08:04 |
lqdice__ |
the add/edit view can be almost identical w/ the exception of the id field |
# |
Aug 9th 2008, 08:04 |
lqdice__ |
[TSK]: $this->render('edit') |
# |
Aug 9th 2008, 08:01 |
[TSK] |
Hi. I remember reading somewhere about re-using the edit view for the add action, but I cannot for the life of me find any information on this anymore. I suspected that it might be something simple like setting $this->view = "edit" in the add action, but that errors out, so I'm guessing that might not be it after all. So, my question is simply this. How do I choose an alternate view template other than the default from a particular ac |
# |
Aug 9th 2008, 08:00 |
lqdice__ |
is it form submission? |
# |
Aug 9th 2008, 08:00 |
lqdice__ |
what are you trying to do ? |
# |
Aug 9th 2008, 07:58 |
TheBig |
So the best way is use session, of cuorse... |
# |
Aug 9th 2008, 07:58 |
lqdice__ |
refer is a header sent by the client |
# |
Aug 9th 2008, 07:57 |
NetersLandreau |
TheBig: initial research proves lqdice__ is correct.. do not trust referring page as reported by apache |
# |
Aug 9th 2008, 07:57 |
kamalcom |
Hi francky06l |
# |
Aug 9th 2008, 07:57 |
TheBig |
I've a registration page, after that you can invite people... Would like to prevent people using that page for spamming |
# |
Aug 9th 2008, 07:56 |
francky06l |
Hi bakers |