You model should be in singular form, which mean that is should be
named "MetricLevel" not "MetricLevels", then CakePHP will ensure that
the correct table will be used.
Enjoy,
John
On Apr 19, 9:08 am, xiaohouzi79 wrote:
> Hi,
>
> I have one table metrics and another table metric_levels. In the
The CakePHP book describes the NOT IN usage at:
http://book.cakephp.org/view/74/Complex-Find-Conditions
You are correct in what you want to do, first find all the lodgings,
which have bookings that overlaps the requested booking. Secondly find
all the lodgings which are not in the first list of lo
The HABTM association is really just a convenience wrapper for when
you want a basic many-to-many join, as soon as you want to do anything
else with the join model/table I would reccomend switching to the more
reliable and predictable:
ModelA hasMany JoinModel
ModelB hasMany JoinModel
JoinModel be
I would use the forms standard DIV class instead of giving it an id.
For example:
[css code]
.input{
width:40em;
float:left;
}
.input label{
width:20%;
float:left;
}
.input input{
width:75%;
float:left;
}
[/css code]
If you have more than one input field, then you can use the in
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 NameCu
No ide, just Textmate for me.
On Apr 19, 6:14 am, Bryan Lim wrote:
> Hi all,
>
> mac users, which ide are you using to develop cakephp? to compile and
> to debug?
>
> I search the group here and realised this discussion is dated back to
> 2009. So, I want to know if there's any changes?
>
> tha
I now see that your code was the hex code, not the decimal code, so
use ↑ for your arrow.
Enjoy,
John
On Apr 19, 9:18 am, sebb86 wrote:
> Hello again John,
>
> this outputs a strange sign:
> Seems like its the arrows hex code.
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd
My preference is Coda - www.panic.com - overdue for a new version, but still
good.
Or there's espresso or Komodo.
Jeremy Burns
jeremybu...@me.com
On 19 Apr 2010, at 05:14, Bryan Lim wrote:
> Hi all,
>
>
> mac users, which ide are you using to develop cakephp? to compile and
> to debug?
>
>
Hello again John,
this outputs a strange sign:
Seems like its the arrows hex code.
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To po
John
Hello,
thank you. I had a similar idea. But how do i code this?
[my css code]
#input
{
float:left;
}
[/code]
[view code]
echo $form->input('db_field', array('label' => 'Label', 'maxLength' =>
'20%', 'div' => array('id' => 'input')));
[/code]
Check out the new CakePHP Questions site http:
Hi,
I have one table metrics and another table metric_levels. In the
Metric model I have $hasMany = 'MetricLevels' but anything inside the
MetricLevels model is totally ignored.
But, if I rename the model to 'Metric' and have $useTable =
'metric_levels' it works fine. I've tried all combinations,
As far as the PHP manual states, you use nnn; so your arrow becomes
Enjoy,
John
On Apr 19, 8:21 am, sebb86 wrote:
> Hello,
> my charset is set to UTF-8.
> But how do i output a UTF-8 sign inside PHP?
>
> For example an arrow (U+2191) in a table cell:
> [code]
> sort(array('asc' =>'id U+219
I agree with John Andersen, you should use the counterCache in this
situation, but to answer your question -- how do you preform a count
in CakePHP from a hasMany relationship -- you get a count like this:
//in a events_controller.php within
function view($id){
$attendants_count = $this->Event->
Use CSS to control how your form elements float in the browser.
For example set the size of the DIV with class "input", then set the
width of the LABEL to 20% and the width of the INPUT to 75%. May be
necessary to use float:left.
Enjoy,
John
On Apr 19, 8:15 am, sebb86 wrote:
> Hello,
>
> when
Looks like your file structure in the web root is not as according to:
http://book.cakephp.org/view/329/Getting-Cake
in which is written that cake and the app directory are on the same
level in the directory hierachy. So in your case, it should be like
this:
...htdocs/
...htdocs/app/
...htdocs/cake
Hello,
my charset is set to UTF-8.
But how do i output a UTF-8 sign inside PHP?
For example an arrow (U+2191) in a table cell:
[code]
sort(array('asc' =>'id U+2193', 'desc'
=>'id U+2191'), 'id'); ?>
[/code]
regards and thanks!
Check out the new CakePHP Questions site http://cakeqs.org and help
On Apr 18, 6:24 pm, tomolang wrote:
> Hi im new in cakephp. so far i like it. but i have one problem.
>
> I dont know how to create checkboxs.
>
> I have a table that called hobbies and i would like to use checkboxs
> to allow the users to select the hobbies they prefer and save this to
> a table.
Hello,
when i create my automagic form elements, they look like:
label // ---> new line
empty text field
Can i disable this word wrap?
Thanks!
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because yo
The proper way in Cake to do l10n is to use full sentences. Not keys/
slugs for the msgids.
By doing so you can use Cakes l10n shell.
On Apr 18, 9:38 pm, "O.J. Tibi" wrote:
> Localization strings in PO files should not be treated on a word-for-
> word basis. It is much more convenient to enter p
Localization strings in PO files should not be treated on a word-for-
word basis. It is much more convenient to enter phrases (at the least)
or paragraphs (at the most) that you want to translate. It might also
be helpful that you do a page-by-page audit of your web app, and from
there coordinate w
Hi all,
mac users, which ide are you using to develop cakephp? to compile and
to debug?
I search the group here and realised this discussion is dated back to
2009. So, I want to know if there's any changes?
thanks,
Bryan
Check out the new CakePHP Questions site http://cakeqs.org and help othe
If you really need empty strings, put whitespace there.
On Apr 18, 4:59 pm, Vesa Jääskeläinen wrote:
> Hi All,
>
> In some situations some localization entries in .po file can have
> empty strings defined in some languages and in some other languages
> there should be some text.
>
> So in example
Hi im new in cakephp. so far i like it. but i have one problem.
I dont know how to create checkboxs.
I have a table that called hobbies and i would like to use checkboxs
to allow the users to select the hobbies they prefer and save this to
a table. then later the user can go and edit the selectio
Hi,
I am facing an issue and I need your help. the issue is that I need to
make a secondary filter to further refine the search results. The user
would give minimal information at the beginning and the application
would return the results along with a sidebar containing more detailed
attributes th
If there is no msgstr, it outputs the msgid.
1 - Not a bug.
2 - Why do you need to get an empty string?
On Apr 18, 2:59 am, Vesa Jääskeläinen wrote:
> Hi All,
>
> In some situations some localization entries in .po file can have
> empty strings defined in some languages and in some other langua
On Apr 18, 4:27 pm, acl68 wrote:
> Hi all,
>
> I developed an application with CakePHP 1.3 on a windows XP machine
> and it works well. Then I transfered it via 2x ftp to my ubuntu 9.10
> machine at home, where a 1.2 application is running flawless. When I
> enter my application folder I only see
Hi!
Does anyone found some component/helper which get ability to Ajax file
upload?
I have tried to use solution described here:
http://bakery.cakephp.org/articles/view/comfortable-ajaxuploads-with-cakephp
But seems that it didn't work now.
Also, I have read
http://bakery.cakephp.org/articles/vi
Hi all,
I developed an application with CakePHP 1.3 on a windows XP machine
and it works well. Then I transfered it via 2x ftp to my ubuntu 9.10
machine at home, where a 1.2 application is running flawless. When I
enter my application folder I only see a blank page, no errors in the
application e
Put it in vendors folder.
Here is an example showing you how to import a vendor if it doesn't
follow cake conventions naming wise.
http://book.cakephp.org/view/579/Loading-Files
On Apr 18, 12:29 pm, Bryan Lim wrote:
> hi all,
>
> if i am using the twitterlibphp library, where should i put this
Hi,
In the blog tutorial at section 10.1.8, I followed all advices, but my
link to "http://localhost:8000/cake/posts/index"; doesn't work. I tried
also "http://localhost:8000/cake/posts";.
My blog application controllers is in the cake folder of my root: "C:
\Programme\Apache Software Foundation\Ap
hi all,
if i am using the twitterlibphp library, where should i put this
library in?
so that require "twitter.lib.php"; will work?
thanks,
bryan
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because y
Hi all,
regarding this tutorial
http://bakery.cakephp.org/articles/view/adding-a-google-map-to-your-app
I downloaded and tried this app http://mooder.org/cakemap/files/app.zip
, but it only display blank page.
I did set up the sql and connect the app to a database. I am running
MAMP. can someon
I think the Auth uses a salt.
On Sun, Apr 18, 2010 at 6:43 PM, Stefano Martins wrote:
> Hello folks,
>
> As I was studying CakePHP and the Auth Component, I've found out that
> it's not using sha1 hashes - or at least it doesn't seems to - by
> default. I had to manually set it to use md5 hashes
It is probably related to the salt value in the configuration that
CakePHP is using!
Which is also why I get yet another sha1 hash for "stefano" in my
application :)
Enjoy,
John
On Apr 18, 6:43 pm, Stefano Martins wrote:
> Hello folks,
>
> As I was studying CakePHP and the Auth Component, I've
Hello folks,
As I was studying CakePHP and the Auth Component, I've found out that
it's not using sha1 hashes - or at least it doesn't seems to - by
default. I had to manually set it to use md5 hashes, following the
instructions given by the Cookbook. For the string "stefano", Cake's
generating th
Hi All,
In some situations some localization entries in .po file can have
empty strings defined in some languages and in some other languages
there should be some text.
So in example in locale A's .po file there would be:
msgid "Entry"
msgstr ""
And then in locale B's .po file:
msgid "Entry"
m
Forget it. It was the SimpleXML case that is all over the net...I
didn't think there was any such code but it was...so a typecast to
string solved it :)
On Apr 17, 11:11 pm, Jonas wrote:
> I am redirecting from a travel site to an online bank. When logged in
> and then cancelling I am supposed to
And Cake will just 'deal with it', without you having to do any work.
Jeremy Burns
jeremybu...@me.com
On 18 Apr 2010, at 11:04, j0n4s.h4rtm...@googlemail.com wrote:
> Hello,
>
> for instance you could have Post, Tag, PostTag, Post HABTM Tag / Post
> HasMany PostTag, Tag HasMany PostTag.
> why t
How would you enforce the logout?
For instance I want to logout a user that is logged in at any other
place (e.g. session) using the same account.
On Apr 17, 7:56 pm, jacmoe wrote:
> Yeah, you're right.
> The beforeFilter could update a user last action session variable with
> a timestamp.
> I wo
Hello,
for instance you could have Post, Tag, PostTag, Post HABTM Tag / Post
HasMany PostTag, Tag HasMany PostTag.
why this example? because it shows the most common place where you
would - outside of Active Record - use a combined primary key -
PostTag would have PrimaryKey(post_id, tag_id) - but
I suggest you don't count the number of registrations every time an
event is being viewed! Instead I suggest you to use the counterCache!
See the CakePHP book at:
http://book.cakephp.org/view/816/counterCache-Cache-your-count
Thus when you find your list of events, the registration count will be
a
41 matches
Mail list logo