your code says, then I'd recommend getting a PHP book
and skimming through it--particularly read the chapters about how
arrays and associative arrays work. You're going to need to know that
stuff to work with cake.
On Jun 14, 11:26 am, mivogt-LU c...@mivogt.net wrote:
HI there,
if I choos
/view/1323/Containabledoes that help?
- S
On 14 June 2010 19:26, mivogt-LU c...@mivogt.net wrote:
HI there,
if I choos in the index view the view button I get all my models data
and also the related models are shown somehow.
i.e. if I choos from customer-index: view I get the customer
in the browser.
If you want to use PHP to generate JavaScript in the _view_ to pop up
a window, then you need to do that in the view, not in the model. The
model is only for reading/writing/manipulating your data.
On Jun 14, 12:03 pm, mivogt-LU c...@mivogt.net wrote:
HI @ all,
I would like to know
HI there,
if I choos in the index view the view button I get all my models data
and also the related models are shown somehow.
i.e. if I choos from customer-index: view I get the customer details.
I also get the orders he placed in some manner.
Sadly instead of an item name I am only shown the
HI @ all,
I would like to know if there is a way to settle some function inside
my aftersave() (inside the modelcode) to open an popupwindow showing
the modeldate in a printable format.
I am thinking on something like
function aftersave()
{
doPopupwindows($this-data)
}
and inside the popup
HI there and welcome to the cake-list
It would be of great use if you show us a bit more of your code as
your are showing only calls of internal functions manmade by the
siteowner
$home might be the main model, usually called $this
- is the obj.orient. kind to access data
$listing as a 2
Hi there,
since I did the update to cake 1.3 final
- debug() does not output anything
- some validatiung is no more done
- limiting date/time range is not working..
echo td.$this-Form-input('Geburtsdatum',array('dateFormat' =
'DMY', 'minYear' = date('Y') - 90, 'maxYear' = date('Y') - 16 ))
Hi there,
since I did the upgrade from 1.3 rc1 to 1.3final I have problems
validating data.
Sometimes the built in validation is not processed
sometimes not all validation rules are processes
sometimes my custom rules are ignored
All worked fine the last days.
Today I did a last check before
Hi there,
as I have some trouble to manage the find() for my wishes, I did a
working sql expression and checked id using $debug.
Sadly the resultset is an array but not assotiativ as it needs to be
used to populate input dropdownbox.
My SQL is:
$Q_Zimmer=
SELECT id
FROM lodgings AS Zimmer
WHERE
Hi Paul,
On 24 Apr., 10:41, WebbedIT p...@webbedit.co.uk wrote:
Which controller are you running this from, I assumed you were running
it from the BookingPosition Controller?
No, I did create a standalone controller without a model in content.
I try to do a lot of reports selecting data from
Hello Paul,
yes THIS REALLY HELPS.
Now I start to _understand_ how to use the find() like I used to do
sql :) thanks a lot.
To comment your suggestion about habtm on meals:
Each request means a customer will arrive having ordered a firstMeal
on arrivalDay meal1
Each request means a customer will
On 23 Apr., 09:08, WebbedIT p...@webbedit.co.uk wrote:
My main tip: Stop trying to force your own model names and fieldnames
and use cakes conventions, makes life a whole lot easier!
Why are you joining Meal/meals when you're not pulling any fields from
it, or have you missed out some
hmpf I am sorry I need more help...
I did false-back (mean I did my wrong naming in again as I use it
current, will have to clean up all later...)
it crashes if I try to run the find()
Warning (512): SQL Error: 1054: Unknown column
'BookingPosition.AnreiseDatum' in 'field list'
I am shure
damn :(
the find() crashes telling unnown fields
Warning (512): SQL Error: 1054: Unknown column
'BookingPosition.AnreiseDatum' in 'field list' [CORE\cake\libs\model
\datasources\dbo_source.php, line 615]
Any idea?
Check out the new CakePHP Questions site http://cakeqs.org and help others with
To generate somer report data I want to execute a short sql command to
collect some data and hand it over as array to the html-table helper
to be displayed.
sql code is
SELECT
BP.AnreiseDatum, BP.AbreiseDatum, BS.name, LS.Zimmernummer,
concat(CS.name,': ',CS.Firma,': ', CS.Vorname,', ',
HI there, I would like to generate a table filled with the result of
an sql command to get a report about stored data.
My query in SQL is like this:
$MyQueryAnreisen=SELECT distinct BP.AnreiseDatum AS AN,
BP.AbreiseDatum AS AB,RQ.name AS ANF, RQ.AnzahlErwachsene AS AnzE,
RQ.AnzahlJugendliche AS
HI there,
I want to use find() to exlude some data on a few conditions.
My app is built like this
customer-request-booking-bookingposition-lodging
with request fields: Id NameCustomerDate1/Date2 (date1,2
arrival,leave requested)
with booking fields: Id Name
Hi there,
I would like to know if there is (and if then how to do) a way to
manipulate data from datetimefields.
I am doing a bookingsystem. Arrival is ment to be at 13:00, leave at
10 :00.
I use datetime fields in the views and database.
Now before saving I would like to always set the arrival
Hi, I need a bit of help using $this or findfirst.
I have a model 'requests' containig date,time, customer etc.
requests $hasOne booking
I have a model 'booking', $belongsTo requests
I modded the add function of bookings to get some parameters i.e.
request_id to pass it to my booking-form.
Now
I also tried adding var $uses = array('customer','request'); in the
bookings controller.
If I do so I get an error inside my find commands:
if ($rid) { $customers = $this-Booking-Customer-
find('list',array('conditions' = array('Customer.id' = $cid)));
}
, mivogt-LU wrote:
I also tried adding var $uses = array('customer','request'); in the
bookings controller.
If I do so I get an error inside my find commands:
if ($rid) { $customers = $this-Booking-Customer-
find('list',array('conditions' = array('Customer.id' = $cid
I am passing some data from controller to my view
i.e. a timestamp as process-id-number (better readable using php
wordwrap function..)
I want the number to be displayed in a form-field but also would like
to set this field to be disabled for changing.
$options does not look to have a disanle
.
::solved::solved::solved
On 16 Apr., 13:03, cricket zijn.digi...@gmail.com wrote:
On Apr 16, 6:18 am, mivogt-LU c...@mivogt.net wrote:
I am passing some data from controller to my view
i.e. a timestamp as process-id-number (better readable using php
wordwrap function..)
I want the number
HI there,
I did a mod to my add function in a model/controller.
My model-1 view now has a button calling the add function of model-2
sending some parameters to be shown in the add view.
Now I want the model-2 to disable any add function inside the
conroller if no data was passed from model-1
hi there, cake stats to be a nice toy tool so far :) ...
I am on the next step of developing my littl app and would like to get
some hints how to do best this:
I have 3 models linked with each other
mod1, mod2, mod3
mod 1 hasOne mod2
mod2 hasMany mod3
So deleting some mod1 data with having a
Hi there,
I culd need a good hint to solve this:
having to form fields of datetime type.
The second should be checked to be later than the first one.
i.e.arrivel befor leaving, leaving after arrivel.
The idea was to convert it _somehow_ from a datetime string to an
integer to check both.
Sadly I
:: solved :: solved :: solved ::
tnx is works :)
solved :: solved :: solved ::
On 15 Apr., 22:13, Deon Heunis d...@heunis.com wrote:
In MySQL, use UNIX_TIMESTAMP(`datetime`)
In PHP, use strtotime($datestamp)
mivogt-LU wrote:
Hi there,
I culd need a good hint to solve this:
having
hi there,
I did my first cake project so far and it works (well - most of it...)
Now I want to do some documentation adding the database-model and the
UML diagram as pictures.
Are there any tools to automate it as much as possible?
ER and UML will shure be very similar as each Class means a
Hi Paul, I found what I need by try and error.
My goal was to assure that a datetime field is filled with data in
special way.
I need to set the date and timeformat (DMY, 24hrs) and also the
interval to assure only full hrs are able to be set.
My app is to do some hotel/hostel like booking and
Hi there,
is it possible to use a datetime field (picker/select-box) combinding
different options to get a min and maxyear and a time interval set to
hours (60 Minutes option drops me a tim field without date function)
TIA CU
Michael
Check out the new CakePHP Questions site http://cakeqs.org
Hi there,
I want to add a new custom action to my controller to get to a view of
a linked model and fill some data to be ready to use when view is
shown.
I have a model called requests containig customer requets.
I also have a model called bookings that is linked to requests and so
to cusotmers,
ok i solved one part of it - so I can redirect to the bookings add
function.
but I am not shure about how to send data to the target.
Is it useful and a good idea to use something like adding a '?
customer_id=123,?booking_id=456 ??
[::code::]
function doBooking($id = null) {
hi cricket and thanks a lot.
sadly I never did a router before
so I ask if you might tell me how and where to do so.
thanks in advance
michael
On 2 Apr., 18:24, cricket zijn.digi...@gmail.com wrote:
On Apr 2, 11:38 am, mivogt-LU c...@mivogt.net wrote:
ok i solved one part of it - so I can
Hi there,
I want to do some autmated customer number/id field within my project.
I found the uuid function but it seems to be hard for a customer and a
staff doing that a long number to identify.
Is there any thing like the uuid but shorter as I will never need to
handle millions of customers...
Hello again, as usual I use the weekend to ask what the week collected
me working with cake...
In my app I have several models and all works fine so far.
i.e. I have a customer model and an order model
I am able to use the baked add funtion to add customers and orders
as the order has a
Hi there I am a bit confused about some habit of my cake app.
I did my database and built all files using cake bake as usual.
Then I added my validation rules manually - doing a small function for
the validation I need, adding it in the validation array of the model.
Both models do use the
hi there,
is is possible to mod the cake bake command to have it a bit
different?
I want to get rid of the questions about validation and testing,
setting both to NO
also I want to have scaffolding a NO and the controller to do the
basic calss methods and the adminrouting YES.
Any hints how to
Hello, me - again ...
Having the index view with pagination I would like to change the
content of the th tags produced by the pagination helper.
If my datafield is NumberOfAdults the code is
th?php echo
$this-Paginator-sort('NumberOfAdults');?/th
but the text is just to
Hi there,
going on with my project I am looking for a way to generate unique
ident-codes for some entries.
I.e. if a customer adds a request to the system I have the internal
index model_id for internal use.
To have a better look and feel for customers and staff I would like to
have something
hi there,
I am looking for a solution to do some very basic translating in my
project.
DatabaseTables and all files are named in english within the capephp
way.
Now I want to have the labels of the input fields in i.e. German
language.
Is it possible to add a file where I just place the original
:51 am, mivogt-LU c...@mivogt.net wrote:
[cake 1.3ß | XAMPP 1.7.3|PHP 5.3.1|MySQL 5.1.41 | Win XP SP3]
Hi everybody,
I just has a little problem with my error-message in a custom
validation function.
If I use the built in functions like required the message is shown so
css and div
@Paul:
I spent some time to the cake book but as not all is translated so far
I gave the only book in my 1st language a try
- 'Webentwicklung mit cakephp', by dirk ammelburger robert scherer
also I had a closer look and some hours with both english books
- Beginning CakePHP by David Golding
-
$form
instead of $this-Form ...?
If you try it, do tell!
John
On Feb 28, 6:29 pm, mivogt-LU c...@mivogt.net wrote:
Hi John,
I had a lokoup to the view code in the browser ... the message is not
contained in html code
some of the model code:
?php
class BookingPosition extends
Hi Paul, I heard your scream still here in Germany ;-)
Thanks so far .. it is hard to learn cake with only one book in my
native language and two other books written in english but nor realy
wrote to fit my needs (they are more done to show hot to do a specific
project with cake).
I think with
[cake 1.3ß | XAMPP 1.7.3|PHP 5.3.1|MySQL 5.1.41 | Win XP SP3]
Hi everybody,
I just has a little problem with my error-message in a custom
validation function.
If I use the built in functions like required the message is shown so
css and div seem to be ok
If I use my own function there is a red
'];
If there is any better way to do so - tell me please :)
CU
Michael
On 25 Feb., 20:05, mivogt-LU c...@mivogt.net wrote:
Hello ... me - again :)
ok if I do a debug on $this-data
I get the array you supposed, showing me bookingpositions containing a
field lodging_id
but how do i extract data from
:59, mivogt-LU wrote:
Hi Jeremy,
your suggested solution also results with an error because of a wrong
Index.
Notice (8): Undefined index: Lodging [APP\models\booking_position.php,
line 78]
if I do
$numberOfBeds = $this-Lodging-
field('Bettenanzahl',array('Lodging.id'=$this-data
, mivogt-LU wrote:
Hello Paul,
sadly there seems to be an error in adressing the model the way you
told me:
Notice (8): Undefined property: BookingPosition::$BookingPosition [APP
\models\booking_position.php, line 78]
Notice (8): Trying to get property of non-object [APP\models
hi there, I have some problems doing my first cake and adding some
validation methods on my own.
It would be great if someone in here might give me a good start and
help me to do my first steps ...
I am using 2 models linked with each other
lodgings : id, roomnumber, amountofbeds, ...
I am newbie to cakephp and after some looking up in books and google I
need still help to start with cake...
I try to do my first application and am using several models linked to
tables and with relations between the models.
i.e.
model lodgings with the numberOfBeds
and a
model
. If it returns false, your validation error should be
set for the field and therefore appear on the form.
Jeremy Burns
jeremybu...@me.com
On 23 Feb 2010, at 08:30, mivogt-LU wrote:
hi there, I have some problems doing my first cake and adding some
validation methods on my own.
It would
- it sounds right. Debug $this-data and check.
Jeremy Burns
jeremybu...@me.com
(Skype) +44 208 123 3822 (jeremy_burns)
(m) +44 7973 481949
(h) +44 208 530 7573
On 23 Feb 2010, at 08:47, mivogt-LU wrote:
Hi Jeremy,
thank you, might I ask if I got the point:
.. (something like $this-data
see exactly what's been posted. Then it's a
case of accessing the right part of the array to get the values you want.
Jeremy Burns
jeremybu...@me.com
(Skype) +44 208 123 3822 (jeremy_burns)
(m) +44 7973 481949
(h) +44 208 530 7573
On 23 Feb 2010, at 08:41, mivogt-LU wrote:
I am newbie
Hello Paul,
thank you so much, yes this helps!
Michael
On 23 Feb., 10:18, WebbedIT p...@webbedit.co.uk wrote:
If I understand your model and field names correctly, after submitting
your BookingPosition form which includes the field Lodging.id, you
should be able to use:
$numberOfBeds =
hello @ all,
I am just starting up my very first project with cakephp (current 1.3ß
on a new xampp 1.7.3 installation).
Setting up db and models worked fine, also baking the main things was
quiet ok and worked well.
Now I want to add my extras to the application and sadly I have no
idea how to
hi, hope the title of my question might fit my thinking ...
I am using a model to collect customer requests
cake bake added the view add delete ... functions to controller and
the buttons this for in the view.
Now I would like to have an additional button in the view to do the
follwing:
get the
56 matches
Mail list logo