Most likely the mysql client is set to use latin-1. To change it from
Cake add the encoding setting to the config/database.php:
var $default = array(
'encoding' => 'utf8', // Convert all character data to
UTF-8
'driver' => 'mysql',
'per
Using 1.3.5
In a new app, I've just noticed that I've got some sort of an encoding
problem. One of the descriptions for my Book model contains some
accented characters (à, é) that are displaying as the dreaded black
diamond with question mark. I'm seeing this in FF, Chrome, and Opera
(haven't both
No the options are randomly numbered (not in equal sets of any denomination)
so that idea as good as it would work will not in this case.
Thanks for the input anyways.
Dave
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You rec
If the number of options in each select are 5 then you can take the
value and divide by 5 and examine the results
But I suspect it would be a dynamic range - again if the total range
is exactly distributed in 3 selects you can do the validation
mathematically
HTH
Tarique
On Fri, Oct 29, 2010 at
Depends on your initial level of knowledge with PHP and OOPS
We train a 1 year experience PHP programmer for 3 weeks (approx 50
hours) before letting them on to an internal CakePHP project.
Performance on the internal project determines if they go on to
commercial projects or not...
HTH
Tarique
Thanks for that, unfortunately, not luck with allowEmpty.
I am going to report a bug and see what happens.
On Oct 29, 11:40 am, cricket wrote:
> On Thu, Oct 28, 2010 at 8:41 PM, Caroline wrote:
> > sorry, not sure I follow. How?
> > Because if the field is blank, Cake does not insert NULL, it ju
Great thanks for your reply. Let me try this way!
If any body having some ideas then please share!
On Thu, Oct 28, 2010 at 11:51 PM, cricket wrote:
> On Thu, Oct 28, 2010 at 1:10 PM, Shadab Shaikh
> wrote:
> > Dear All,
> > I got some weird problem on today, problem is that I have setup a
> w
On Thu, Oct 28, 2010 at 8:41 PM, Caroline wrote:
> sorry, not sure I follow. How?
> Because if the field is blank, Cake does not insert NULL, it just
> ignore the field.
My bad. I forgot we were talking about an update. So, if the column
was defined to be DEFAULT NULL, and the user deletes the de
sorry, not sure I follow. How?
Because if the field is blank, Cake does not insert NULL, it just
ignore the field.
I would have to explicitly write
If ($data['Taxcode']['description']=='') $data['Taxcode']
['description'] = null;
before calling the save method.
I know I can use beforeSave and other
On Thu, Oct 28, 2010 at 7:50 PM, Caroline wrote:
> sorry I meant every time I need to update, like if description is
> blank then insert null.
Well, there you go--Cake does that for you ;-)
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related que
On Thu, Oct 28, 2010 at 7:38 PM, dingerkingh wrote:
> How would one change the label that is generated in this example?
label?
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 t
On Thu, Oct 28, 2010 at 5:57 PM, Jeremy Burns | Class Outfit
wrote:
> I've tried a few ways of doing that and the only success I had was adding
> extra keys to the Auth->user array after the user logs in, which means it'll
> be available thereafter. I'd be interested to know if there is a better w
What are the limitations of Caching data?
If you cache various data for users / posts and such and say you have 100k
users with 10 different cached datasets for example is this possible (1
million cached files)?
Is there a limit that can not be exceeded (other than hosting limitations
of spac
Weird, if a add an attachment of any kind it seems to work fine and
display the html version of the email.
On Oct 29, 10:20 am, jbgillet
wrote:
> Has anyone ever come across a problem when sending emails through
> cake, instead of displaying the html version it attaches it in a file
> called ATT
sorry I meant every time I need to update, like if description is
blank then insert null.
On Oct 29, 9:42 am, Caroline wrote:
> Ok, fair enough, wrong example. Thanks for the tip, though.
> In my previous post, please replace the code by this (same outputs):
>
> $object = array();
Ok, fair enough, wrong example. Thanks for the tip, though.
In my previous post, please replace the code by this (same outputs):
$object = array();
$object['Taxcode']['id'] = '63ae4d63efeecf1655e9b948fdc114a8';
$object['Taxcode']['description'] = '';
How would one change the label that is generated in this example?
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 post to this group, se
On Thu, Oct 28, 2010 at 5:38 PM, Caroline wrote:
> This is the code I run:
> $object = array();
> $object['Taxcode']['id'] = '63ae4d63efeecf1655e9b948fdc114a8';
> $object['Taxcode']['acctaxcollected_id'] = '';
> $object['Taxcode']['acctax
Has anyone ever come across a problem when sending emails through
cake, instead of displaying the html version it attaches it in a file
called ATT01425.htm The attachment number varies.
I have tried different email clients Outlook 2007, 2010, entourage,
getting the same thing.
Using Cake 1.3.4 on
I've tried a few ways of doing that and the only success I had was adding extra
keys to the Auth->user array after the user logs in, which means it'll be
available thereafter. I'd be interested to know if there is a better way.
Jeremy Burns
Class Outfit
jeremybu...@classoutfit.com
http://www.cl
So I have my login working using the Auth component which returns the user
data when I call $this->Auth->user. The user record is tied to a location
via its domain_id. The problem I am having is that I need to have the domain
name from that Id, but the Auth->user function only returns the first lev
This is the code I run:
$object = array();
$object['Taxcode']['id'] = '63ae4d63efeecf1655e9b948fdc114a8';
$object['Taxcode']['acctaxcollected_id'] = '';
$object['Taxcode']['acctaxpaid_id'] = '';
$this->Taxcode->save($ob
:D.. :D...that's why we are here for :D
--
Tilen Majerle
http://majerle.eu
2010/10/28 Tomfox Wiranata
> that was fast. it worked. i appreciate it ;)
>
> On 28 Okt., 22:54, Tilen Majerle wrote:
> > use an attribute in image options
> >
> > "onclick" => "return confirm(\"Are you sure?\");"
> >
that was fast. it worked. i appreciate it ;)
On 28 Okt., 22:54, Tilen Majerle wrote:
> use an attribute in image options
>
> "onclick" => "return confirm(\"Are you sure?\");"
>
> --
> Tilen Majerlehttp://majerle.eu
>
> 2010/10/28 Tomfox Wiranata
>
> > hi,
>
> > this code deletes sth on click.
>
Ok this might be hard to explain.
Picture a single form that has multiple selects.
Each select belongs to a section_id so it can range between 1 -5 in its id
value. A Section has many Options and Options belong To Section
Each section_id has many options so to make it clear to understand
S
use an attribute in image options
"onclick" => "return confirm(\"Are you sure?\");"
--
Tilen Majerle
http://majerle.eu
2010/10/28 Tomfox Wiranata
> hi,
>
> this code deletes sth on click.
>
> php echo $html->image("icons/delete.png", array(
>"alt" => "delete",
hi,
this code deletes sth on click.
php echo $html->image("icons/delete.png", array(
"alt" => "delete",
'url' => array('controller' => 'products',
'action' => 'delete',
$pr['Product']['id'])
)); ?>
it did!
THX THX THX :)
On 28 Okt., 01:24, Michael T wrote:
> On Oct 28, 5:17 am, Tomfox Wiranata wrote:
>
> > how do view and layout work together? thx :)
>
> Conceptually, the view should only contain the HTML relevant to a
> specific action, while the layout should contain HTML that is co
OK My "path" wasn't correct and I don't know how I didn't notice.
Thanks for your help guys.
--
View this message in context:
http://cakephp.1045679.n5.nabble.com/force-download-using-Media-views-tp3238139p3241181.html
Sent from the CakePHP mailing list archive at Nabble.com.
Check out the new
Hi,
ich upgraded my project to 1.3.5 and now my validation rules are not
working any more. I used the folllowing code with version 1.3.3 and it
worked just fine:
[code]
class User extends AppModel {
var $name = 'User';
var $validate = array(
'username' => array(
On Thu, Oct 28, 2010 at 4:58 AM, sonam wrote:
> How much time is required to learn cakephp?
That depends on you. It's really not something anyone else could
evaluate. It would probably be easier for you to assess that yourself
by having a look at the manual and the API.
Check out the new CakePHP
On Thu, Oct 28, 2010 at 7:17 AM, ravidp wrote:
> Hi
>
> In my database i have the following associations:
> Result hasMany Measurement
> Measurement belongsTo Result
> Result belongsTo Chip
> Chip hasMany Result
>
>
> I want to pa
Here's a link to one of the listings we're posting:
http://www.eliteopensourcejobs.com/jobs/view/4cc9a9c8-0ca0-4181-b3cf-657e45591f8c
If you're interested you can email me here dj (at) isvonline (dot) org
International Student Volunteer ISV is creating a new database-driven
International website
Hi,
I am pretty new to cake and I'm working with an existing codebase.
I am trying to do a search, namely find all channels with category X
and have an asset which has the tag Y.
The models are:
Channel:
belongsTo: Channelcategory;
hasMany: Asset
hasMany: Tag (I have defined this association usi
How much time is required to learn cakephp?
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 post to this group, send email to cake-php@g
Hello, I am not aware of a helper/component that does this.
You can create you a list of the files in app / locale via PHP using
the glob() function, but you can not translate it because it is not a
fixed string (and especially the glob occurs in runtime) And "bake
i18n extract" can not generate th
Hello,
I am not aware of a helper/component that does this.
You can create you a list of the files in app/locale via PHP using the
glob() function, but you can not translate it because it is not a
fixed string (and especially the glob occurs in runtime) And "bake
i18n extract" can not generate the.
i tend to do those things "on demand"
using a behavior to add new keys or even doing it in the model
afterFind() etc often results in additional work without actually
needing this information
but of course this depends on the particular case
On 28 Okt., 20:10, cricket wrote:
> On Thu, Oct 28, 20
Sure, no problem.
Just use 2 db configs and set the $default db config on runtime:
file app/config/database.php
class DATABASE_CONFIG {
var $default = null;
var $dev = array(
'driver' => 'mysql',
'persistent' => false,
'host' => 'localh
On Thu, Oct 28, 2010 at 1:10 PM, Shadab Shaikh wrote:
> Dear All,
> I got some weird problem on today, problem is that I have setup a website,
> which is absolutely working fine in local server,
> but when I upload it on live server then its having some time problem for
> view rendering, some time
On Thu, Oct 28, 2010 at 10:03 AM, euromark wrote:
> thats not correct for PHP5 anymore
> in PHP4 you needed to do this
> but in PHP5 it is passed by reference by default, afaik
Agreed on passing the model to the view. But this could also be
accomplished in afterFind(), adding new key => value to
On Thu, Oct 28, 2010 at 5:58 AM, Unite wrote:
> Question is simple : I need to be able to delete a row (ARO ACO
> relationship) using the ACL component.
>
> Note :
> I do not mean setting permissions for CRUD to -1-1-1-1
> The row needs to be physically removed.
> CRUD of -1-1-1-1 DOES NOT have th
Dear All,
I got some weird problem on today, problem is that I have setup a website,
which is absolutely working fine in local server,
but when I upload it on live server then its having some time problem for
view rendering, some time browser seems busy...
page is loading & loading... few ajax req
http://bakery.cakephp.org/articles/view/load-balancing-and-mysql-master-and-slaves-2<--
since this link isn't working for Cake > 1.2.x, besides it didn't work
for related model neither (from the comment on that article : "If this model
is associated with other models using belongsTo, hasMany etc.,
Hi
I have CakePHP 1.2
I have Security.level = medium because with high I have many problems
with Ajax calls because the session is renewed every time.
With Security.level = medium I have noted that the session doesn't
expire when I close the browser window.
My question is how can do to expire sess
Hey guys
Yes, it's me again... Cleaning up some dirty codes from my antecessor.
I have a User model that can export some INI data with a getIni()
method. The User model is related to many different models that server
some data for the INI data:
function getIni() {
$data = '';
$data .= 'stree
Hi stab,
I don't really know about ajax-upload. As I'm using plupload in one of
my projects and guess it's similar. You're right the media plugin's
transfer behavior doesn't natively handle streams, yet. Here's an
excerpt of the code I'm using to workaround that:
if ($this->RequestHandler->reques
thats not correct for PHP5 anymore
in PHP4 you needed to do this
but in PHP5 it is passed by reference by default, afaik
On 28 Okt., 15:06, Hashim Ikram wrote:
> I have not try it but if you want to set instance of a Model, I think you
> should pass it as
>
> $this->set('book', &$this->book)
>
>
Thanks, this is exactly what i wanted.
On Oct 28, 2:10 pm, "Mike Karthauser" wrote:
> On Thu, October 28, 2010 1:05 pm, chris wrote:
> > Hi
>
> > Fairly new to developing in cakePHP and run into a problem that I
> > can't see a simple solution for.
>
> > I have a model that has 2 forigen id's. In
I wanted to create 2 separated web site which will use same models and
controllers.
main aim - run 2 sites which will use almost the same logic but it
will be build with different design.
I wanted to use same models and controllers, because I want to support
only one version.
so database structur
On Thu, October 28, 2010 1:05 pm, chris wrote:
> Hi
>
> Fairly new to developing in cakePHP and run into a problem that I
> can't see a simple solution for.
>
> I have a model that has 2 forigen id's. In some cases, I do not want
> to save anything in one of these id fields.
>
> I want to give the
I have not try it but if you want to set instance of a Model, I think you
should pass it as
$this->set('book', &$this->book)
In other words you should pass it by reference.
Regards
Hashim Ikram
On Thu, Oct 28, 2010 at 3:45 PM, Joshua Muheim wrote:
> Thanks for your reply.
>
> You mean I shou
Hey there,
> function imadethis() {
> $return = $this->query( /* incidentally you could use find for this
> or infact any select but it doesn't change the result */ );
> foreach ($return as &$row) {
> $row['seatavail'] += $row[0];
> unset ($row[0]);
> }
> return $return;
>
> }
>
> hth,
I
please post your sql debug output (the produced queries)
On 28 Okt., 12:52, Caroline wrote:
> Thanks for your replies.
> Yes I might try to file it in trac, like you suggest, Cricket.
>
> Euromark, yes my field is varchar NOT NULL and I don't think I have a
> bug because it is a pretty straight
On Oct 28, 1:51 pm, joe_90 wrote:
> > how is the xml error related to your use of query.
>
> Well, I think it is because the array that is coming back contains two
> sub-arrays:
>
> array(4) {
> [0]=>
> array(2) {
> ["seatavail"]=>
> array(5) {
> ["ThtId"]=>
> string(3) "
i need to correct myself
/** static **/
function isRent($data) {
return !empty($data['rent_user_id']);
}
and you simply use it this way:
//in views
if (Model::isRent($book['Book'])) {...}
this way it it can be used in any iteration as well
On 28 Okt., 12:45, Joshua Muheim wrote:
> Thanks fo
Hi
Fairly new to developing in cakePHP and run into a problem that I
can't see a simple solution for.
I have a model that has 2 forigen id's. In some cases, I do not want
to save anything in one of these id fields.
I want to give the user a drop down option which reads something like
'None', and
What is your goal?
On Thu, Oct 28, 2010 at 12:31 PM, Dmitry Shevchenko wrote:
> Hi.
> Is it possibly for cake to have 2 different database, which is use
> same models and controllers and different views.
>
> I need this to create a almost copy of website, so system logic will
> be the same, I wil
> how is the xml error related to your use of query.
Well, I think it is because the array that is coming back contains two
sub-arrays:
array(4) {
[0]=>
array(2) {
["seatavail"]=>
array(5) {
["ThtId"]=>
string(3) "500"
["ShoId"]=>
string(3) "100"
["PerTi
On Oct 27, 4:20 pm, Carlos Lavin wrote:
> It is "standard". However, CakePHP isn't built to manage multi-column PK's,
> always single columned
>
> 2010/10/27 Dan
>
>
>
> > On Oct 27, 3:07 pm, cricket wrote:
> > > On Wed, Oct 27, 2010 at 8:07 AM, Dan wrote:
> > > > Structure:
>
> > > > Projects
Hi,
I'v realized that my problem is totally different from what we
discussed.
The contain DOES fetch what I wanted but the condition is the
problem.
I'v opened a new discussion about. lets continue there:
http://groups.google.com/group/cake-php/browse_thread/thread/8297e5f1b7b25c9a
P.S.
Type is
Hi
In my database i have the following associations:
Result hasMany Measurement
MeasurementbelongsTo Result
Result belongsTo Chip
Chip hasMany Result
I want to paginate something like the following query:
SELECT M.*
FROM measur
On Oct 25, 11:56 pm, ervin wrote:
> Hi,
>
> i've used cake for several websites and i never had such a problem.
>
> Now one of my websites is an online car selling website when users can
> signup and post their cars for sale.
>
> It's about a couple of weeks that every day i find some empty post
Right, I forgot about that... Silly me. Thank you, Mark!
On Thu, Oct 28, 2010 at 11:59 AM, euromark wrote:
> beforeSave() would be it
>
>
> On 28 Okt., 11:49, psybear83 wrote:
>> High everybody
>>
>> I have a model with two fields. The first field is altered using
>> Model->set(), and as soon a
Thanks for your replies.
Yes I might try to file it in trac, like you suggest, Cricket.
Euromark, yes my field is varchar NOT NULL and I don't think I have a
bug because it is a pretty straight forward operation. Only when the
field is blank, it seems to be ignored. If you don't have the problem,
On Oct 27, 6:16 pm, joe_90 wrote:
> Hey guys,
>
> I've got a controller, which needs to do a complex SQL query:
>
> function view($seatsRequired) {
> $this->set('seatavail', $this->Seatavail->query("
> SELECT ThtId,ShoId,PerTime,SroID,firstUnused, IF(mincid IS NULL,
> IFN
Thanks for your reply.
You mean I should stick the code above into my view (including the
App::import(...))? I agree with you, this would quite break the MVC
convention. But what speaks against using this code in the
controller...
$this->set('book', $this->Book);
and then just using the $book in
Hi Josh,
It is better to use Model functions in controller according to MVC
convention, but if you want to use model function in view you can use it in
this way.
/* - */
App::import('Model',array('Book'));
$bookObj = new Book();
Hi.
Is it possibly for cake to have 2 different database, which is use
same models and controllers and different views.
I need this to create a almost copy of website, so system logic will
be the same, I will only have separated DB and views.
Seems this could be done by switching config on config
Oh my word - you just made that so easy! Thank you so much for your
detailed explanation - it is obvious you put some time into this
question for me. Thanks again - I owe you!
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You re
i agree that this would be handy at some point
but it helps to keep the layers separated
otherwise one would be tempted to read/write to the DB in the views
i usually use static model methods for this
/** static **/
function isRent($data) {
return !empty($data[$this->alias]['rent_user_id']);
}
beforeSave() would be it
On 28 Okt., 11:49, psybear83 wrote:
> High everybody
>
> I have a model with two fields. The first field is altered using
> Model->set(), and as soon as this happens, I want the other field to change
>
> its value (to the current time), too. Is there a hook mechanism or
Question is simple : I need to be able to delete a row (ARO ACO
relationship) using the ACL component.
Note :
I do not mean setting permissions for CRUD to -1-1-1-1
The row needs to be physically removed.
CRUD of -1-1-1-1 DOES NOT have the same effect as the row not being
there at all.
Reason :
I
High everybody
I have a model with two fields. The first field is altered using Model-
>set(), and as soon as this happens, I want the other field to change
its value (to the current time), too. Is there a hook mechanism or
something that can be used to do that?
Thanks, Josh
Check out the new Ca
Hi everybody
Something I don't really like in CakePHP is that one seems to be
always only working with the $data array instead of "real" model
instances. I hate to name Ruby on Rails again, but in RoR, I normally
pass a model instace to a view, and there I can do handy stuff like
calling methods o
must be a bug on your side
i can always empty my fields this way!
is your field set to varchar(x) NOT NULL?
On 28 Okt., 05:40, cricket wrote:
> On Wed, Oct 27, 2010 at 8:00 PM, Caroline wrote:
> > Hi,
> > I am trying to update a field to an empty string in my DB. Sounds
> > simple and I cannot f
76 matches
Mail list logo