Questions in Category: Models

RSS

0 answers

0 votes

Asked by poifox, 3 hours, 52 minutes ago in Models

Variables set but inaccessible?

Hello!

I'm using this code:


public function repack($id = null ){
    $this->Post->id = $id;
    /* before this, all usual checks are in pace: exists() etc... */
    $post = $this->Post->read(null,$id);
    debug($post);
    print_r($post);
   ...

0 answers

0 votes

Asked by rahuldh, 7 hours, 15 minutes ago in Models

On my local server login works fine but on my server login fails.how to login?

hi..

I have built application which contains authentication function.

In that when i log in then it will redirects to index.ctp page and without login user can register.

It works very fine on my local server.

I am using 'gprotocol.com' as a server.So...

0 answers

0 votes

Asked by franky, 10 hours, 43 minutes ago in Models

Set DB-Config in Join?

Hey guys,

i was just wondering if its possible to set the db-Configuration in a join?

For example:

$joins = array(

array(

'table' = 'users',

'alias' = 'User',

'type' = 'inner',

'db' = 'dbConfig',

'conditions' = array(

'dbConfig.User.id =...

0 answers

0 votes

Asked by PierreLechelle, 1 day, 3 hours ago in Models

Attachable model

Hello,

I've a little question about CakePHP models and relationship between them.

I've a Note model, and I want it to be attachable with any model dynamically (with a behavior).

For example : I'm in the ContactsController, I want to get attached...

0 answers

0 votes

Asked by digdafunk, 1 day, 7 hours ago in Models

how can i connect to multiple databases via shell?

hey,

i have two models in different databases. if i use $useDbConfig in one model the other one is searched in the same db. i've tried to use the default connection for the "other" one but this doesn't work ... anybody knows how to make right in...

1 answer

0 votes

Asked by dokuman, 1 day, 14 hours ago in Models

Query

hello i have a query like this

select jawab, frekuensi, round(100*frekuensi/total,0) as persentase from

( select jawab, count(*) as frekuensi from (

select pertanyaan1 as jawab from quesionerstakeholders union all

select pertanyaan2 as jawab from...

1 answer

0 votes

Asked by Lucky1968, 2 days, 8 hours ago in Models

Hide code through encryption

Hi,

Does anyone know if there's a possibility to encrypt files in /app so no one can see the original code?

Regards,

Luc

1 answer

0 votes

Asked by only4abhishek, 2 days, 15 hours ago in Models

View , ADD , Edit and Delete not working according to follow blog turorial 2.0

Index page so all , but when I click on addpost link it will show object not find,

this cases also happened on edit,delete or view .

localhost/cakephp/posts/edit/1 but show object not find

1 answer

0 votes

Asked by omzaay, 2 days, 18 hours ago in Models

Mock cakerequest to make request->data available in the controller

Hey guys,

I was wondering if there is a way where can i mock request->data in a test case so it cab be available in the controller to use? i have been searching all around and didn't find a clue, please try to help :)

0 answers

0 votes

Asked by hswner, 2 days, 20 hours ago in Models

Paginating Facebook like conversations list in CakePHP 2.1 (Related to group-wise maximum, sub-query, join)

I have the following MySQL tables:


CREATE TABLE IF NOT EXISTS `conversations` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `user1_id` int(11) NOT NULL,
    `user2_id` int(11) NOT NULL,
    PRIMARY KEY (`id`),
    UNIQUE KEY `user1_id_2`...
<< previous 1   2   3   4   5   6   7   8   9

How does CakePHP Questions work?

CakePHP Questions is easy to use: Register and login or directly login using OpenID and just ask your question!

After you ask your question you just need to wait until you have got some answers and pick the correct answer.

Other users might help you by finding the right answer by voting and giving comments.