Nareh,
please try to start reading some basic tutorials about php, not the cakephp
itself, then the blog example from cake's book. What you are asking for and
what you asked for yesterday, shows that you need at first some info about
how http, html and php work at all then you can start with a fram
Write below router in route.php
Router::connect('/cms_pages/:action/*',
array('controller' => 'cms_pages', 'action' => 'view'),
array(
'routeClass' => 'SluggableRoute',
'your_variable_name' => array('your_variable_value')
));
Write below code in a file
CakeRoute doesn't talk to View. You can set params to be passed to the
controller, though. For example (in parse method):
$params = parent::parse($url);
...
$slugs = array_flip(Set::extract("/Page/slug_${params['lang']}", $data));
if (isset($slugs[$params['slug']]))
{
$params['pass'][]
Works for me:
$q = $this->Post->query("SHOW FULL PROCESSLIST");
die(debug($q));
Of course, debug needs to be enabled, and caching disabled. Have you
checked that?
On Wed, Aug 29, 2012 at 2:24 PM, andrewperk wrote:
> Hello,
>
> I need to be able to print out some data from my database such as:
>
Does your model have AclBehavior set up?
public $actsAs = array('Acl' => 'controlled');
On Tue, Aug 28, 2012 at 12:07 PM, Elhelaly wrote:
> Using Cakephp 2.1.2
> I am trying to make a method to generate the Aco's (check if there is a new
> controller or methods and add it in aocs table)
> I have
Hi everyone.
I did this:
$this->paginate = array(
'limit' => 10,
'conditions' => array(' Model1 .eliminado'=>'0'),
);
$model1 = $this->paginate('Model1');
$this->paginate = array(
'limit' => 10,
);
$model2= $this->paginat
Hi guys
I'm stuck on a new problem these hours... I've just coded an extended
CakeRoute and I need to set some variables. Unfortunately, the $this->set()
function can't be used as it points to the extended CakeRoute class. How
can I set a variable inside the parse() function for showing it insid
Yea, i know itbut i want other thing
For example when I click on some username, it opens all information about
the user and in address writes: ./?id=1
--
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake
http://book.cakephp.org/2.0/en/controllers.html#Controller::set
Paul
On 29 Aug 2012, at 19:59, Nareh Tarasyan wrote:
> How do you pass parameters from controlller to view?
>
> For example:
>
> echo "".$i."
> "."";
> How to do it in cake?
>
> --
> You received this message because you are
*How do you pass parameters from controlller to view?*
*
*
*For example:*
*
*
* echo "".$i." "."";
*
* How to do it in cake?*
--
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscri
Hello,
I need to be able to print out some data from my database such as:
"SHOW FULL PROCESSLIST"
"SHOW GLOBAL STATUS"
"SHOW GLOBAL VARIABLES LIKE 'hostname'"
etc..
How can I accomplish this? What I've been trying to do is use the query()
method in a model to run my own custom query but that's
try this
http://arafats.info/cakephp-findbyfieldname-data-read/
On Wed, Aug 29, 2012 at 4:08 PM, Nareh Tarasyan wrote
:
> Hey, ppl. help me.
> I try this code:
>
> IndexsController.php
> $this->set('x', $this->Word->findByid(10));
>
> then
> view/Indexs/index.ctp
> echo "word= ".$x;
>
> It echo
Thanks all now I found the error source.
I already have tried all the possible orders for defining the routes but as
said before it was not the source of error. the problem was with the
trailing slash on this rule:
Router::connect('/my-controlle**r/', array('controller' => 'my_controller',
'action'
Are you sure the field exists in the database?
--
Murgan, Alexis Germán
Desarrollador & Diseñador
Web: german.murgan.com.ar
Email: ger...@murgan.com.ar
MSN: ger...@murgan.com.ar
Móvil: +5493424663813
--
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
T
That did not work either.
--
View this message in context:
http://cakephp.1045679.n5.nabble.com/complex-find-tp5710758p5710795.html
Sent from the CakePHP mailing list archive at Nabble.com.
--
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post
On Wednesday, 29 August 2012 17:16:58 UTC+2, Mohammad Naghavi wrote:
>
> we are all trying to contribute something back into community, so if you
> want to help please do
>
I don't know your contribution - but I have and I do,
https://github.com/cakephp (find me)
> if not don't try to chan
we are all trying to contribute something back into community, so if you
want to help please do it, if not don't try to change the whole world match
your needs just because you don't like it. I use colors to recognize my
text from others as fast as possible. If you don't like it, it doesn't mean
it
On Wednesday, 29 August 2012 16:45:39 UTC+2, Mohammad Naghavi wrote:
>
> I don't consider the color change unnecessary, the time of HTML emails was
> a long time ago started. if you have color problems use a terminal
> email client.
>
Except google groups is primarily a web application.
I
Hello,
i am having following problem: $this->Model->find() doesn't get past the
own model in a Test Case. For example,
i have Comment belongsTo Article with public $belongsTo = array( 'Article'
=> array('className' => 'ArticlesPlugin.Article', 'foreignKey' =>
'article_id')) in the Comment model
an
Yeah, Mark, I also thought so and tried, but it doesn't work. Doesn't echo
anything :/
--
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to
cak
I don't consider the color change unnecessary, the time of HTML emails was
a long time ago started. if you have color problems use a terminal
email client.
thanks for the suggestion however, I have already tried any possible order,
it relies on the cake implementation I think for what I don't h
$this->set('randword',
$this->Word->findById(rand(1,$this->Word->find('count';
On Wednesday, August 29, 2012 10:24:26 AM UTC-4, Nareh Tarasyan wrote:
>
> Thanks Marcus
>
> but u know what I did here... see:
>
> $this->set('rand', rand(1,$this->Word->find('count')));
> $this->
On Wednesday, 29 August 2012 16:17:51 UTC+2, Mohammad Naghavi wrote:
>
> @Sophistry: tried that, no changes.
>
> @AD7six: as stated also before, I have this route too, but nothing
> changes:
> Router::connect('/my-controller/', array('controller' => 'my_controller',
> 'action'=>'index'));
>
Read. The. Manual.
Jeremy Burns
Class Outfit
http://www.classoutfit.com
On 29 Aug 2012, at 15:24:26, Nareh Tarasyan wrote:
> Thanks Marcus
>
> but u know what I did here... see:
>
> $this->set('rand', rand(1,$this->Word->find('count')));
>
> $thi
Ok, your IndexsController has view() method? If not exists you need create
the view() method in the IndexsController and in this method set the vars.
--
Murgan, Alexis Germán
Desarrollador & Diseñador
Web: german.murgan.com.ar
Email: ger...@murgan.com.ar
MSN: ger...@murgan.com.ar
Móvil: +54934246
Thanks Marcus
but u know what I did here... see:
$this->set('rand', rand(1,$this->Word->find('count')));
$this->set('randword', $this->Word->findById());
I want ID= value of rand function, but don know how to write it.
--
You received this message because you are subscribed to
@Sophistry: tried that, no changes.
@AD7six: as stated also before, I have this route too, but nothing changes:
Router::connect('/my-controller/', array('controller' => 'my_controller',
'action'=>'index'));
I tried to remove default routes or to change the order but no success, I
think this is no
3rd time lucky perhaps.
Router::connect('/my-controller/:action/*' <-
This can only possibly generate a url of the form "/x/y/" or "/x/y/etc."
Routes are not magic - they do what they say, and what your route says is
"include the action in the url", so it does.
AD
On Tuesday, 28 August 2012 0
@Mohammad I recall having a similar issue... it was because the controller
name in the Router::connect() second parameter was not capitalized. try
that?
On Tuesday, August 28, 2012 3:20:39 AM UTC-4, Mohammad Naghavi wrote:
>
> @Salines: I read the page twice and didn't get any point about why ha
Thanks people.
I tried all, but none helps.That variables work in index.ctp, but not in
view :/
--
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send ema
all hope is lost
On Wednesday, 29 August 2012 15:27:06 UTC+2, Nareh Tarasyan wrote:
>
> how can I use usual PHP functions in controller?
>
> for example i use
> $rand=rand(1,$number)
>
> in View/index.ctp
>
> but don know how to use in controller?
>
--
You received this message because you are
Hi,
You can use any PHP function in your controller just like you use it in
your normal PHP code.
It same in controller too :-
function index()
{
$rand=rand(1,$number);
}
Enjoy ,
Marcus
--
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to
how can I use usual PHP functions in controller?
for example i use
$rand=rand(1,$number)
in View/index.ctp
but don know how to use in controller?
--
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@google
Oh, yes, I did so than k u ver much :)
On Wednesday, August 29, 2012 2:52:17 PM UTC+4, Jeremy Burns wrote:
>
> $x (badly named variable) is an array. The first key will be 'Word', which
> is itself an array where each key represents a field in the table; so, for
> example, you could echo
Depends of operating system. What operating system do you use?
--
Murgan, Alexis Germán
Desarrollador & Diseñador
Web: german.murgan.com.ar
Email: ger...@murgan.com.ar
MSN: ger...@murgan.com.ar
Móvil: +5493424663813
--
You received this message because you are subscribed to the Google Groups
"C
You never set to view file te $game and $word vars. Add to end of
index()method this:
$this->set('game', $game);
$this->set('word', $word);
I recommend you read the following:
http://book.cakephp.org/2.0/en/getting-started.html#blog-tutorial
--
Murgan, Alexis Germán
Desarrollador & Diseñador
Web:
Hi,
I was down loaded cakephp 2.2.1 from http://cakephp.org/downloads link,
The thing is how to make the cakephp running environment, Can any one guide
me step by step, Because of i am new to php i am java developer. Just i got
some work in cakephp in my office that's why i need some sup
Hi I've got a formulaire to cretaes Blog Post. In this form I ve a Category
Select.
I'd like to add a category item in the category select using a popup or
jquerry ui dialog but I really don't know how to start. How to post the
category and how to refresh the select
I've you got any ideas
--
And ...
$this->set(compact('games'));
Em quarta-feira, 29 de agosto de 2012 08h40min58s UTC-3, Lucas Simon
Rodrigues Magalhaes escreveu:
>
> change this variable $game = $this->Game->find('all');
> to
> $games = = $this->Game->find('all');
>
> in IndexsController .
>
>
> Em quarta-feira, 29
change this variable $game = $this->Game->find('all');
to
$games = = $this->Game->find('all');
in IndexsController .
Em quarta-feira, 29 de agosto de 2012 05h08min00s UTC-3, Nareh Tarasyan
escreveu:
>
> Hi people.
> I'm a beginner in CakePHP.
> And I need help.
>
> I try to use loadModel
$x (badly named variable) is an array. The first key will be 'Word', which is
itself an array where each key represents a field in the table; so, for
example, you could echo $x['Word']['id]; and that would print the id to screen.
On 29 Aug 2012, at 11:21, Shiv Shankar wrote:
> It would return
It would return an array. so use print_r($x); not echo.
On Wednesday, August 29, 2012 3:38:04 PM UTC+5:30, Nareh Tarasyan wrote:
>
> Hey, ppl. help me.
> I try this code:
>
> IndexsController.php
> $this->set('x', $this->Word->findByid(10));
>
> then
> view/Indexs/index.ctp
> echo "word= ".$x;
>
Try debug($x);
T
On Wed, Aug 29, 2012 at 3:38 PM, Nareh Tarasyan wrote:
> Hey, ppl. help me.
> I try this code:
>
> IndexsController.php
> $this->set('x', $this->Word->findByid(10));
>
--
=
PHP for E-Biz: http://sanisoft.com
I think it should be
$this->set('x', $this->Word->findById(10)); not $this->set('x',
$this->Word->findByid(10));
Shiv
On Wed, Aug 29, 2012 at 3:44 PM, AD7six wrote:
> Have a look at what $x is.
>
> On Wednesday, 29 August 2012 12:08:04 UTC+2, Nareh Tarasyan wrote:
>>
>> Hey, ppl. help me.
>> I
Have a look at what $x is.
On Wednesday, 29 August 2012 12:08:04 UTC+2, Nareh Tarasyan wrote:
>
> Hey, ppl. help me.
> I try this code:
>
> IndexsController.php
> $this->set('x', $this->Word->findByid(10));
>
> then
> view/Indexs/index.ctp
> echo "word= ".$x;
>
> It echoes
>
> word=Array;
>
>
>
Hey, ppl. help me.
I try this code:
IndexsController.php
$this->set('x', $this->Word->findByid(10));
then
view/Indexs/index.ctp
echo "word= ".$x;
It echoes
word=Array;
What is the problem??? When I have loaded Word model in my
IndexsController, and I have a record with id=10 in db table.
Hi there,
I have a question towards the one who know who Cake internally works. I'm
using MySql with InnoDB engine and therefore I have full foreignkey
support. I have also set all the on update and on delete actions in
database, so I can say I can totally rely on the DB now and can turn off
the c
Hi people.
I'm a beginner in CakePHP.
And I need help.
I try to use loadModel.
I have two models: games and words.
In db have two tables: games(where I keep game difficulty levels) and
words(where I keep words that I use in my game).
Now I created IndexsController, where I load two models.
He
Hi
My problem is that I'm using two cake folder in single application.
I hahe the structure as
1>http_docs
>app1
>portal
-App2
What I want is:
1> When user type user/login applcation use portal/app2
2> When user type pages/home app
49 matches
Mail list logo