Questions tagged [cakephp-2.1]

This tag relates to the 2.1.x branch of the CakePHP MVC framework.

CakePHP is a rapid development framework for PHP that provides an extensible architecture for developing, maintaining, and deploying applications. Using commonly known design patterns like MVC and ORM within the convention over configuration paradigm, CakePHP reduces development costs and helps developers write less code.[1]

The release of CakePHP 2.1 beta was announced on CakePHP official site on 2012-01-23.

The latest CakePHP stable version is 2.1.5 Security Release resolving security issues related to the XML class.

[1] From the CakePHP home page.

1009 questions
-1
votes
1 answer

Creating new record if the id is not in db

I am working on a cakephp 2.x , I want to create a new row or record if the userid is not present in db otherwise update the record, but the problem is: it is not updating the current record. It is creating the record with the userid "0" I dont…
hellosheikh
  • 2,929
  • 8
  • 49
  • 115
-1
votes
2 answers

JsonP with CakePHP

I am working on a CakePHP 2.x app and trying to implement JSONP. It's my first time, so I don't know how can I do this: $(function(){ $.getJSON("https://www.example.com/myweb/api/getjsonp&jsoncallback=?", function(data){ console.log(data); …
hellosheikh
  • 2,929
  • 8
  • 49
  • 115
-1
votes
1 answer

session timeout forever cakephp

i am working on a Cakephp 2.x ... i am using auth component ... the problem write now is that the session automatically expires after some minutes.. i mean if the user does nothing then CakePHP logs them out after some period...i want to make…
hellosheikh
  • 2,929
  • 8
  • 49
  • 115
-1
votes
1 answer

cakephp error while saving data

i am working on a cakephp 2.x ... well the scenario is that i am sending messages to my webapp ... there are almost 509 messages ... the problem is it is saving some messages into db and on some messages it gives me an error on android console ...…
hellosheikh
  • 2,929
  • 8
  • 49
  • 115
-1
votes
1 answer

join in cakephp 2.x

How can I implement this query in cakephp? I can't get the information from Users table. SELECT * FROM Manufacture LEFT JOIN Order ON Manufacture.order_id = Order.id LEFT JOIN User ON Order.user_id = User.id; Manufacture: id order_id Order: id…
IgorPr
  • 11
  • 3
-1
votes
2 answers

extract date from datatime in php or Cakephp

i have a table in my cakephp which have a field name datetime and datatype is datetime storing in this format 2013-06-18 00:00:00 I need to extract the date part of the value not the time .. i extract time like this $dateTime =…
hellosheikh
  • 2,929
  • 8
  • 49
  • 115
-1
votes
2 answers

Send token with HTTP POST from android to cakephp

i am sending data from an android device to my cakephp website through HTTP Post in json object ..like this HttpPost post = new HttpPost("https://www.mywebtest.com/test"); and then i decode the json and extract the data like this …
hellosheikh
  • 2,929
  • 8
  • 49
  • 115
-1
votes
1 answer

login through email and phone number just like facebook in cakephp

i am new in cakephp.i am developing an application in which there is a login page .. i have a database where the the user email with his number is also stored in the database ... now what i want is in facebook you can login through your email and…
hellojohn
  • 109
  • 1
  • 3
  • 12
-1
votes
1 answer

cakephp friendship between users Linking models together

What I need: A facebook-like friendship system. User (A) sends a requests for a friendship with User (B) User (B) confirmes the request User (A) and User (B) are friends now My problem: I'm confused how to work this out. I read a lot on the…
kenwebart
  • 51
  • 2
  • 9
-1
votes
1 answer

Cakephp custom URL using Route

I would like to format my URL like so: /teacher/page:2 to /teacher I would like to achieve this result by using as less code as possible (perhaps only from routes.php?), without modifying how the PaginatorHelper behaves. Thank you for your help!
Subir
  • 130
  • 1
  • 3
  • 10
-1
votes
1 answer

i18n localization within cakephp shell task file

I know that Cakephp can do i18n localization with the .pot files and the various language po files, with __("string"); on the view files. However, I am trying to export data in csv through the use of the Shell. May I know how is it possible to…
jl.
  • 2,209
  • 12
  • 49
  • 61
-1
votes
1 answer

can i make nested for each in cakephp

I have a problem in cakephp controller $due = $this->Issue->find('all' , array('conditions' => array ('Issue.user_id'=>6))); $this->set('due',$due); $id = $due['0']['Issue']['book_id']; $b = $this->Bookmaster->find('first' , array ('conditions' =>…
shajis001
  • 3
  • 3
-1
votes
1 answer

How to access profile model filename field to display each users profile picture

Hi all I am trying to access the profile picture filename for each individual user as and when they are logged into the system. I have a 'profiles' table and I need to make this available in my default.ctp view file as I am trying to load profile…
Joshua
  • 371
  • 2
  • 6
  • 23
-1
votes
1 answer

CakePHP 2.1 excel file export and import to database

I am using cakephp 2.1 and developing an application which needed more data. I want to use excel file for import and export. Please suggest me some solutions to get it done.
Sanganabasu
  • 943
  • 7
  • 21
  • 39
-1
votes
1 answer

How to display an image inside a link in Cakephp

Possible Duplicate: CakePHP: image inside link, want to make link point to image location I'm trying to add an image (in $avatar) to a link in cakephp, but it displays as the text echo $this->Html->link( $avatar, '/notifications/ajax_show',…