Re: Model chaining for a find statement not returning expected results

2014-09-12 Thread Paul Drage
Thanks Stephen I did a cake bake all (auto) which generated all the models- in hindsight perhaps manually coding them would have been an advantage? I used dogmatic69(.com) yesterday and it told me there was about 3 tables which were named incorrectly: it would of been nice for cake bake to

Re: Model chaining for a find statement not returning expected results

2014-09-12 Thread Stephen S
No problem Paul The dogmatic69 website seems like a good resource, plural tables, singular foreign keys (underscored followed by _id) and usually a good idea to add created DATETIME and modified DATETIME to each table (with the exception of hasAndBelongsToMany etc) Hopefully this will work out

Re: Model chaining for a find statement not returning expected results

2014-09-11 Thread Paul Drage
Should i just move everything to a different controller? surely there must be a way to do the association i need right in/before the query?? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are

Re: Model chaining for a find statement not returning expected results

2014-09-11 Thread Mike Karthauser
hi paul if you are using recursive =1 in you queries you won't get all the info you need. I suggest you look at containable behaviour. ] http://book.cakephp.org/2.0/en/core-libraries/behaviors/containable.html BTW Its makes no odds which controller calls the model function. On 11 Sep 2014, at

Re: Model chaining for a find statement not returning expected results

2014-09-11 Thread Paul Drage
Cheers for that Mike, I tried containing and ran into lots of different issues, I then spent about half an hour writing a REALLY UGLY javascript client side hack to do my lookup for me (against a different set of results), it was fast becoming a farce (see what i did there?) Would you be

Re: Model chaining for a find statement not returning expected results

2014-09-11 Thread Stephen S
Hi Paul I notice you've got both DeviceRepairs and DeviceRepair within your associations, this is likely your issue. It's convention to have a singular model name i.e. *DeviceRepair, RepairType*, a plural controller name i.e. *DeviceRepairsController, RepairTypesController* and a plural table

Re: Model chaining for a find statement not returning expected results

2014-09-11 Thread Stephen S
I think it's also worth mentioning that you don't need to define all the parameters of an association if you're not overwriting the default values, this can be a good way to test if you've set up your associations correctly. public $belongsTo = array( 'DeviceType' ); I will also note that

Re: Model chaining for a find statement not returning expected results

2014-09-09 Thread Paul Drage
Any thoughts are welcome at all - I've managed to run the chained query in a different controller so I'm now sure it's my has many/belongs to rules - But after trying some (even more) ideas with the relationships i'm still getting the error relating to a non object when i try it in the

Model chaining for a find statement not returning expected results

2014-09-08 Thread Paul Drage
Hi Guys, I've been trying to get this query going for a couple of days - I wrote some really hacky (non cakey php) code to lookup a 'name' field given the 'id' field that I *am* getting out of the query - it sort of worked but it was a real mess. I know that this can be done, and it can be

Prepared Statement (Custom SQL) always returns bool(true) instead of results

2013-08-16 Thread Xtagon
Hi, I know that it is always recommended to use find() instead of custom SQL, but I have a use case where I need to use a custom prepared statement. Problem is, it always returns bool(true) instead of a results array, even if I'm just doing a very basic SELECT with nothing complex going

Re: Prepared Statement (Custom SQL) always returns bool(true) instead of results

2013-08-16 Thread Xtagon
statement. Problem is, it always returns bool(true) instead of a results array, even if I'm just doing a very basic SELECT with nothing complex going on in the query. Is this a bug or am I using the function wrong? Here's an example of code that would return bool(true) as shown by dump_var

sql statement Cake 1.3 uses to add data

2013-02-02 Thread Anja Liebermann
an array with ['A'] and all the data which should go to A. I already disabled any beforeSave and validation rules, but still no save. My question: How can I see with which sql statement Cake tries to add the data to my table? All I found is ways to see the select statements, but none for inset

Re: sql statement Cake 1.3 uses to add data

2013-02-02 Thread Jonathan Sundquist
You should be able to set debug level to 2 and see all statement types. On Feb 2, 2013 12:58 PM, Anja Liebermann c...@anjaliebermann.de wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello everybody, I need help to find out why my model isn't saving. I use version 1.3.14 and develop

Re: sql statement Cake 1.3 uses to add data

2013-02-02 Thread Anja Liebermann
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Jonathan, debug 2 ( or also 3) only shows me the SELECT statements, but not the INSERT statements. Calamity Jane Am 02.02.2013 20:01, schrieb Jonathan Sundquist: You should be able to set debug level to 2 and see all statement types. On Feb

Re: sql statement Cake 1.3 uses to add data

2013-02-02 Thread Jonathan Sundquist
: You should be able to set debug level to 2 and see all statement types. On Feb 2, 2013 12:58 PM, Anja Liebermann c...@anjaliebermann.de wrote: Hello everybody, I need help to find out why my model isn't saving. I use version 1.3.14 and develop with Cake since some years

Re: sql statement Cake 1.3 uses to add data

2013-02-02 Thread Anja Liebermann
, but not what I intended. Also no further information to find in tail -f /var/www/myapp/tmp/logs/debug.log tail -f /var/www/myapp/tmp/logs/error.log When I try the mentioned method in the post for the app_model I get as last request a select statement searching for the slug I implemented. Strange

Re: view group, photo, blog in foreach statement

2012-11-24 Thread Chris
solved,... On Friday, November 23, 2012 9:53:16 PM UTC-8, Chris wrote: hi guys,... is there a way of show group, blog, photo,... whichever comes in in notification table I have a view of: ?php $i = 0 ? ?php foreach($notes as $note): ? ?php echo

view group, photo, blog in foreach statement

2012-11-23 Thread Chris
hi guys,... is there a way of show group, blog, photo,... whichever comes in in notification table I have a view of: ?php $i = 0 ? ?php foreach($notes as $note): ? ?php echo $html-link($groupBannerShow-square($note), '/groups/view/' . $note['Group']['id'], array('escape'=false)) ? ?php

Re: add subquery to every find-statement in beforeFind

2012-11-03 Thread bs28723
belongs to rent-time. in table for rent-time there are two timestamps (start and end). now i want to modify every find-statement for model car and add a subquery like this: select *, (select id from rent-time where start gt;= time() and end lt;= time

add subquery to every find-statement in beforeFind

2012-11-02 Thread Mathias R
Hi, i have a model which belongs to another like model car belongs to rent-time. in table for rent-time there are two timestamps (start and end). now i want to modify every find-statement for model car and add a subquery like this: select *, (select id from rent-time where start = time

Re: if statement

2012-09-02 Thread girl
Thanks people. I debug, it returns null :/ Means something is wrong in code. Here is my controller: ?php class IndexsController extends AppController { public $helpers = array('Html', 'Form', 'Session'); public $components = array('Session'); public function index() { //

Re: if statement

2012-09-02 Thread euromark
sry, what you are doing there is just horrible. I cannot find any other words for it. please go through tutorials and the book first your code is a mess in multiple ways and it doesnt seem you have understood a single bit of what i wrote. you cannot just use those deep arrays in php functions.

Re: if statement

2012-09-02 Thread girl
Yeah, dear euromark. I completely agree with you. I know i should and I'm planning start this week. Just I have a small php code and need to do it with cake. ANyways, thanks for reply. -- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this

if statement

2012-08-31 Thread girl
Hi ppl... I'm an absolute beginner in programming and what I ask, maybe is very simple, but i need it very much and soon :) So the problem is in if statement I write $this-set('position', 0); if(in_array($_GET['var'], $this-Word-findById(11))) { $this-set('position', $this-array_search($_GET

for statement

2012-08-31 Thread girl
Hi ppl... I'm a beginner in programming, and I know what i ask my seem too simple, I just need it too much and soon :) there is a problem in in statement. $this-set('position', 0); if(in_array($_GET['var'], $this-Word-findById(11))) { $this-set('position', $this-array_search($_GET[' var

Re: if statement

2012-08-31 Thread Marcus James
Hi, It means that either the word you are searching is in first position, that's why its echoing 0 or (in_array($var_get, $word ) is empty ,meaning $var_get is not inside the array $word. -- You received this message because you are subscribed to the Google Groups CakePHP group. To post to

Re: if statement

2012-08-31 Thread euromark
you should firstly debug your variables properly using debug() you would find out that the result returned by findBySomething is a deep array (not a flat one) from there I am certain you will figure it out Am Freitag, 31. August 2012 11:44:26 UTC+2 schrieb marco metal: Hi, It means that

Re: if statement

2012-08-31 Thread Robert Gravel
just in case you are unaware in core.php Configure::write('debug', 2); -- 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

Re: Redirect to Different Action in If Statement

2012-06-30 Thread lowpass
(i.e., member, as opposed to admin? Note: I do NOT want to hear about routes. That might be the right way to go generally, but in this case it's not. I just want to know how to do an IF statement in the index action that will redirect the user to the view action. Thank you. -- Our newest site

Re: Redirect to Different Action in If Statement

2012-06-29 Thread kwixson
the index action to the view action if the user has a particular role (i.e., member, as opposed to admin? Note: I do NOT want to hear about routes. That might be the right way to go generally, but in this case it's not. I just want to know how to do an IF statement in the index action

Redirect to Different Action in If Statement

2012-06-28 Thread kwixson
an IF statement in the index action that will redirect the user to the view action. Thank you. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions

Re: Redirect to Different Action in If Statement

2012-06-28 Thread Tilen Majerle
: I do NOT want to hear about routes. That might be the right way to go generally, but in this case it's not. I just want to know how to do an IF statement in the index action that will redirect the user to the view action. Thank you. -- Our newest site for the community: CakePHP Video

Can you add a conditional statement in the model class?

2012-06-07 Thread Lucky1968
Hi, In my model I would like to add $hasMany after checking the availability of the other model first (which is in a plugin), so something like this: if (condition) { public $hasMany = array( ... } Can someone tell me how this is done? Thanx in advance. -- Our newest site for the

Re: Can you add a conditional statement in the model class?

2012-06-07 Thread stork
public function __construct($id = false, $table = null, $ds = null) { parent::__construct($id, $table, $ds); if (App::import('Model', 'PluginName.ModelName')) { $this-bindModel(array( 'hasMany' = array( 'PluginName.ModelName' ) ),

Re: Strange problem with find statement

2012-01-05 Thread jeremyharris
Perhaps the result from the second find is empty, because the article is not active? Also, I can't tell from the view code snippet, but if you're expecting one result then you'll have a problem because find('all') returns multiple in the following format:

Strange problem with find statement

2011-12-27 Thread ahmed fakher
when fetch articles and comments i use this function function view($id=null) { $article = $this-Article-findById($id); $comment = $this-Article-Comment-find('all', array('conditions' = array('Comment.article_id' = $id, 'Comment.status' = 1)));

How to change WHERE statement for SQL Select.

2011-11-29 Thread GG
I know why it's not working, I just cannot figure out how to fix it. These are my errors: 1. Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'id' in 'where clause' 2. SQL Query: SELECT `Period`.`period_id`, `Period`.`title`, `Period`.`created`, `Period`.`modified`,

Re: How to change WHERE statement for SQL Select.

2011-11-29 Thread Graham Weldon
It looks like the issue is with your non-standard database structure, perhaps. On your Model/Period.php model, set the primary key to be 'period_id' since that looks like your primary key: class Period extends AppModel { public $primaryKey = 'period_id'; /// Other code here... }

Re: How to change WHERE statement for SQL Select.

2011-11-29 Thread GG
Let me clarify... private function isActionable($id) { if($this-Session-read('Auth.User.role') == 'admin'){ return true; } $post = $this-Period-find('first', array( 'conditions' = array( 'id' = $id,

Re: How to change WHERE statement for SQL Select.

2011-11-29 Thread GG
Actually, that worked... It's perfect As far as database structure... would this be a standard way of structuring my tables? Table 1 (users) id usernamepassword Table 2 (posts) id postuser_idtype_id Table 3 (types) type_idtype_name On Nov 29, 5:48 pm, Graham Weldon

Re: How to change WHERE statement for SQL Select.

2011-11-29 Thread Graham Weldon
Yeah, so the conventions approach would be to use: Primary Key: id (int 11, or char 36) Foreign Key: name_id (int 11 or char 36) where name is the singular name of a model. Example: CREATE TABLE `posts` ( `id` CHAR(36) NOT NULL PRIMARY KEY, `user_id` CHAR(36) NOT NULL, `name`

Re: How to pagine a custom sql statement?

2011-09-29 Thread Greg Skerman
http://book.cakephp.org/view/1237/Custom-Query-Pagination explains how to implement custom pagination logic. On Thu, Sep 29, 2011 at 12:55 AM, heohni heidi.anselstet...@consultingteam.de wrote: Hi, I have to use a own sql statement: $results = $this-Bookmark-query(' SELECT

How to pagine a custom sql statement?

2011-09-28 Thread heohni
Hi, I have to use a own sql statement: $results = $this-Bookmark-query(' SELECT DISTINCT OBJ_NUMMER FROM Gesamtobjekt WHERE obj_id IN ($variableIDs) AND eia_id IN (SELECT les_fkid_eia_id FROM Link_eia_static

Re: parse error in Html-link onclick statement.

2011-05-12 Thread varai
wrote: On May 11, 2011, at 10:45,varaiwrote: the onclick statement in the following code is giving an error: Parse error: parse error, expecting `')'' in C:\wamp\www\merry_flowers \views\pages\faq.ctp on line 13 div id=questionDiv?php echo $this-Html-link('Q.Are admissions to Merry

Re: parse error in Html-link onclick statement.

2011-05-12 Thread Ryan Schmidt
On May 12, 2011, at 02:22, varai wrote: By the way, do you know on what is the difference between $this-Html-link and $html-link? $html-link() was used in CakePHP 1.2 and earlier. As of CakePHP 1.3 the new preferred way to write it is $this-Html-link(). See the first paragraph here:

Re: parse error in Html-link onclick statement.

2011-05-12 Thread varai
Ok, I got it. Thanks. On May 12, 11:02 pm, Ryan Schmidt google-2...@ryandesign.com wrote: On May 12, 2011, at 02:22,varaiwrote: By the way, do you know on what is the difference between $this-Html-link and $html-link? $html-link() was used in CakePHP 1.2 and earlier. As of CakePHP 1.3

parse error in Html-link onclick statement.

2011-05-11 Thread varai
Hi the onclick statement in the following code is giving an error: Parse error: parse error, expecting `')'' in C:\wamp\www\merry_flowers \views\pages\faq.ctp on line 13 div id=questionDiv?php echo $this-Html-link('Q.Are admissions to Merry Flowers program open throughout the year?','#',array

Re: parse error in Html-link onclick statement.

2011-05-11 Thread Ryan Schmidt
On May 11, 2011, at 10:45, varai wrote: the onclick statement in the following code is giving an error: Parse error: parse error, expecting `')'' in C:\wamp\www\merry_flowers \views\pages\faq.ctp on line 13 div id=questionDiv?php echo $this-Html-link('Q.Are admissions to Merry Flowers

Re: Contain and SQL Statement Question

2011-04-01 Thread heohni
Ok you're right! But I have the need to use the data for later processing So regarding the view, I use pagination, that is ok! But I am still thinking about an solution for the later steps. On 31 Mrz., 20:40, cricket zijn.digi...@gmail.com wrote: On Thu, Mar 31, 2011 at 8:15 AM, Jeremy

Re: Contain and SQL Statement Question

2011-04-01 Thread cricket
On Fri, Apr 1, 2011 at 8:42 AM, heohni heidi.anselstet...@consultingteam.de wrote: Ok you're right! But I have the need to use the data for later processing So regarding the view, I use pagination, that is ok! But I am still thinking about an solution for the later steps. If you have

Contain and SQL Statement Question

2011-03-31 Thread heohni
Hi, I have the following models: Member hasMany Payments Payment belongs to a member To get now all members and their payments I do the following statement: $this-paginate = array( 'fields' = array(.), 'conditions' = array(...), 'contain' = array

Re: Contain and SQL Statement Question

2011-03-31 Thread Eugenio
to a member To get now all members and their payments I do the following statement: $this-paginate = array(            'fields' = array(.),            'conditions' = array(...),            'contain' = array(                'Payment' = array(                    'fields' = array

Re: Contain and SQL Statement Question

2011-03-31 Thread heohni
a LEFT JOIN, I get nicer statement, but loosing the sorted result, as the array will look like: Array ( [0] = Array ( [Member] = Array ( [id] = 5 ) [Payment] = Array ( [id

Re: Contain and SQL Statement Question

2011-03-31 Thread Jeremy Burns | Class Outfit
) ) ) Which is really perfect for me. I am just worried about the performance later when the number of member is raising. If I do a LEFT JOIN, I get nicer statement, but loosing the sorted result, as the array will look like: Array ( [0] = Array

Re: Contain and SQL Statement Question

2011-03-31 Thread heohni
nicer statement, but loosing the sorted result, as the array will look like: Array (    [0] = Array        (            [Member] = Array                (                    [id] = 5                )            [Payment] = Array                (                    [id] = 3270

Re: Contain and SQL Statement Question

2011-03-31 Thread Jeremy Burns | Class Outfit
the performance later when the number of member is raising. If I do a LEFT JOIN, I get nicer statement, but loosing the sorted result, as the array will look like: Array ( [0] = Array ( [Member] = Array ( [id] = 5

Re: Contain and SQL Statement Question

2011-03-31 Thread cricket
On Thu, Mar 31, 2011 at 8:15 AM, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: If you are returning this data to display on a view you wouldn't want to show this much data, so you'd use pagination which cuts down the number of rows returned. This won't apply if you are

Re: php statement as to appear replaced in views

2011-02-09 Thread ShadowCross
Chris: After reviewing your code snippets, here are some of my recommendations: 1) Instead of defining your classes as: Video - belongsTo VideoCategory - belongsTo User - hasMany VideoComment - hasMany VideoFavorite VideoFavorite - belongsTo User - belongsTo Video User - hasMany Video -

Re: php statement as to appear replaced in views

2011-02-09 Thread chris...@yahoo.com
Hi Shadow, and again Thank you so much, but in some point it still unclear for me what to do exactly, I have tried it tried it,... and not giving up...! lol You sound like one of the Senior Programmer in here. I would like to ask you if you can take a look of my script,... I will give you access

Re: php statement as to appear replaced in views

2011-02-09 Thread ShadowCross
Hi Chris: In the simplest scenario, where the user is viewing one video at a time: - you have the Video id (passed as a parameter to the action, i.e. http://www.example.com/app/videos/view/123) - you have the User id ($this-user['id'] from your previous code snippets) - you can use the find()

Re: php statement is_set or array_key_exist ??

2011-02-08 Thread euromark
some group, or video,... the button to Add to Favorites MUST BE REPLACED WITH Remove Favorites I want to know how to make that statement in php... I don't know how... lol I'm still a newbie,... but have some experiance from long time ago. And what I'm doing is creating Social Network site

Re: php statement as to appear replaced in views

2011-02-08 Thread chris...@yahoo.com
Hi Shadow, Thank you for your help and try, ... here are the tables say for Videos Favorite Feature: videos Table: id int(11) UNSIGNEDNo auto_increment user_id int(11) Yes NULL category_id int(11)

Re: array_key_exists php statement

2011-02-07 Thread Amit Badkas
; //better choice if (isset($this-params['controller']) $this-controller == 'gifts') { } }}} -- Lep pozdrav, Tilen Majerlehttp://majerle.eu 2011/2/7 chris...@yahoo.com chris...@yahoo.com Hi guys,... how u ding... I need help with php statement. I'm

Re: array_key_exists php statement

2011-02-07 Thread euromark
/7 chris...@yahoo.com chris...@yahoo.com Hi guys,... how u ding... I need help with php statement. I'm getting an error: Parse error: syntax error, unexpected ';' in /home/zipmaniak/ zippopeople.com/html/app/views/gifts/admin_manage.ctp on line 93 ?php

Re: php statement as to appear replaced in views

2011-02-07 Thread chris...@yahoo.com
that statement in php... I don't know how... lol I'm still a newbie,... but have some experiance from long time ago. And what I'm doing is creating Social Network site, and with little or no knowlllege at all do so far this much. Can you PLEASE help me with my project?? Or anyone... ?? Here is my

php statement is_set or array_key_exist ??

2011-02-07 Thread chris...@yahoo.com
that statement in php... I don't know how... lol I'm still a newbie,... but have some experiance from long time ago. And what I'm doing is creating Social Network site, and with little or no knowlllege at all do so far this much. Can you PLEASE help me with my project?? Or anyone... ?? Here is my

Re: php statement is_set or array_key_exist ??

2011-02-07 Thread Ed Propsner
Favorites I want to know how to make that statement in php... I don't know how... lol I'm still a newbie,... but have some experiance from long time ago. And what I'm doing is creating Social Network site, and with little or no knowlllege at all do so far this much. Can you PLEASE help me

Re: php statement as to appear replaced in views

2011-02-07 Thread ShadowCross
Chris: I find it extremely difficult to make any recommendations without additional details, particularly: - the associations you defined in your User and Video models - the code in the controller/action that will be used to retrieve the information from the model(s) - the code (or snippet) of

array_key_exists php statement

2011-02-06 Thread chris...@yahoo.com
Hi guys,... how u ding... I need help with php statement. I'm getting an error: Parse error: syntax error, unexpected ';' in /home/zipmaniak/ zippopeople.com/html/app/views/gifts/admin_manage.ctp on line 93 ?php if(!(array_key_exists($gift['GiftCategory']['name'])) ? Please some one help me

Re: array_key_exists php statement

2011-02-06 Thread Jeremy Burns | Class Outfit
As the error says; ?php if(!(array_key_exists($gift['GiftCategory']['name'])); ? Sent from my iPad On 7 Feb 2011, at 05:56, chris...@yahoo.com chris...@yahoo.com wrote: Hi guys,... how u ding... I need help with php statement. I'm getting an error: Parse error: syntax error

Re: array_key_exists php statement

2011-02-06 Thread Tilen Majerle
== 'gifts') { } }}} -- Lep pozdrav, Tilen Majerle http://majerle.eu 2011/2/7 chris...@yahoo.com chris...@yahoo.com Hi guys,... how u ding... I need help with php statement. I'm getting an error: Parse error: syntax error, unexpected ';' in /home/zipmaniak/ zippopeople.com/html/app/views

Re: array_key_exists php statement

2011-02-06 Thread chris...@yahoo.com
['controller']) $this-controller == 'gifts') { } }}} -- Lep pozdrav, Tilen Majerlehttp://majerle.eu 2011/2/7 chris...@yahoo.com chris...@yahoo.com Hi guys,... how u ding... I need help with php statement. I'm getting an error: Parse error: syntax error, unexpected ';' in /home

Re: array_key_exists php statement

2011-02-06 Thread chris...@yahoo.com
statement. I'm getting an error: Parse error: syntax error, unexpected ';' in /home/zipmaniak/ zippopeople.com/html/app/views/gifts/admin_manage.ctp on line 93 ?php if(!(array_key_exists($gift['GiftCategory']['name'])) ? Please some one help me with this...  or if I have to call from

Re: php statement as to appear replaced in views

2011-01-24 Thread chris...@yahoo.com
video_id int(11) UNSIGNEDNo 0 user_idint(11) No 0 video_user_id int(11) UNSIGNEDNo 0 created where video_user_id is original video poster. I need to create this statement e.g. ?php if(($favorite['VideoFavorite

Re: php statement as to appear replaced in views

2011-01-24 Thread Jon Bennett
       No      0  user_id        int(11)                 No      0  video_user_id  int(11)         UNSIGNED        No      0  created where video_user_id is original video poster. I need to create this statement e.g. ?php if(($favorite['VideoFavorite']['user_id']  == )): ? ...?? I don't know how

Re: php statement as to appear replaced in views

2011-01-24 Thread Miles J
       int(11)                 No      0  video_user_id  int(11)         UNSIGNED        No      0  created where video_user_id is original video poster. I need to create this statement e.g. ?php if(($favorite['VideoFavorite']['user_id']  == )): ? ...?? I don't know how... lol Thank You All

Re: php statement as to appear replaced in views

2011-01-24 Thread cricket
video poster. I need to create this statement e.g. ?php if(($favorite['VideoFavorite']['user_id']  == )): ? ...?? I don't know how... lol Check against $this-Session-read('Auth.User.id'). -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new

Re: php statement as to appear replaced in views

2011-01-24 Thread ShadowCross
, chris...@yahoo.com chris...@yahoo.com wrote: Hi guys, I wanna to make a statement in ../views/resume/view.ctp I have a table named: resume  id     int(11)         UNSIGNED        No              auto_increment  user_id        int(11)                 Yes     NULL  name   varchar(120

php statement as to appear replaced in views

2011-01-23 Thread chris...@yahoo.com
Hi guys, I wanna to make a statement in ../views/resume/view.ctp I have a table named: resume id int(11) UNSIGNEDNo auto_increment user_idint(11) Yes NULL name varchar(120)latin1_swedish_ci No content

Re: php statement as to appear replaced in views

2011-01-23 Thread cricket
On Sun, Jan 23, 2011 at 5:59 PM, chris...@yahoo.com chris...@yahoo.com wrote: Hi guys, I wanna to make a statement in ../views/resume/view.ctp I have a table named: resume  id     int(11)         UNSIGNED        No              auto_increment  user_id        int(11)                 Yes

Re: php statement as to appear replaced in views

2011-01-23 Thread chris...@yahoo.com
No cricket,... no,.. no,... there is no java issue that I have. All I want is to make a statement to hide Create Resume link when resume is created, and show links to Edit Resume and Delete Resume . Please,... anyone help... Thanks Chris On Jan 23, 4:21 pm, cricket zijn.digi...@gmail.com wrote

Re: php statement as to appear replaced in views

2011-01-23 Thread Sam Sherlock
make your display link dependent on the action. On 24/01/2011, chris...@yahoo.com chris...@yahoo.com wrote: No cricket,... no,.. no,... there is no java issue that I have. All I want is to make a statement to hide Create Resume link when resume is created, and show links to Edit Resume

Re: php statement as to appear replaced in views

2011-01-23 Thread Sam Sherlock
make your nav display links dependent on the action. On 24/01/2011, chris...@yahoo.com chris...@yahoo.com wrote: No cricket,... no,.. no,... there is no java issue that I have. All I want is to make a statement to hide Create Resume link when resume is created, and show links to Edit Resume

Setting a where-statement in the find-function

2010-07-04 Thread Tomfox Wiranata
']; endforeach; ? /span /div i dont need the loop, do I!! the SELECT statement would now be without further restrictions in my WHERE clause. it finds all entries . but i just wanna have the user

Re: Setting a where-statement in the find-function

2010-07-04 Thread nini
($users as $user):                                         echo $user['User']['firstname'];                                 endforeach;                                 ?                                 /span                         /div i dont need the loop, do I!! the SELECT statement

Re: Setting a where-statement in the find-function

2010-07-04 Thread Tomfox Wiranata
'];                                 endforeach;                                 ?                                 /span                         /div i dont need the loop, do I!! the SELECT statement would now be without further restrictions in my WHERE clause. it finds all entries . but i just wanna

Re: Setting a where-statement in the find-function

2010-07-04 Thread cricket
):                                        echo $user['User']['firstname'];                                endforeach;                                ?                                /span                        /div i dont need the loop, do I!! the SELECT statement would now be without further

mysql prepared statement in CAKE?

2010-04-12 Thread toka...@gmail.com
Hi, is it possible to do prepared statement in cake?? http://dev.mysql.com/doc/refman/5.0/en/sql-syntax-prepared-statements.html if so, how? Thanks Tomas Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received

Re: mysql prepared statement in CAKE?

2010-04-12 Thread toka...@gmail.com
Is there any PDO support in cake? PDO is able to prepare and execute statements... http://www.php.net/manual/en/pdo.prepared-statements.php On 12 dub, 11:39, toka...@gmail.com toka...@gmail.com wrote: Hi, is it possible to do prepared statement in cake?? http://dev.mysql.com/doc/refman/5.0

How do I see a SQL statement?

2010-01-18 Thread koala kid
I am getting the SQL error below but its not showing me the actual SQL statement that Cake is generating. Is there any way of seeing what it is? Warning (512): SQL Error: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right

Re: How do I see a SQL statement?

2010-01-18 Thread Wayne Fay
I am getting the SQL error below but its not showing me the actual SQL statement that Cake is generating. Is there any way of seeing what it is? Turn on debug mode. http://cake-php.blogspot.com/2006/09/21-things-you-must-know-about-cakephp.html Wayne Check out the new CakePHP Questions site

Re: How do I see a SQL statement?

2010-01-18 Thread cricket
it to the DB as an SQL statement. It's possible that Cake's virtual modeling (or whatever it's called) is the culprit. It could be that your SpecialsController isn't properly seeing the Special model and so is relying on AppModel, which doesn't know about your method. To tell the truth, I can't remember

Re: Edit form attempting INSERT INTO statement and fails

2009-11-10 Thread Dewayne Pinion
It turns out I did have a mix of cases. Sorted that out now thanks. Have another issue though: When I try to add a new entry for my page's comments, I am returned to the main page (which is what I want), but the main page is blank!? I then have to refresh the page (usually I can only do it by

Edit form attempting INSERT INTO statement and fails

2009-11-09 Thread dpinion
Greetings, I am a bit new to cake, and am diving in via the cookbook. I have a simple app I am trying to develop, and am modifying the cookbook example to fit it. So far everything has worked great with one exception. I have an edit form that when I go to it it fills in with the DB data from the

Re: Edit form attempting INSERT INTO statement and fails

2009-11-09 Thread O.J. Tibi
Hi, I'm guessing your primary key field is misspelled? You could try replacing ID with id (lower case). Cheers, OJ On Nov 10, 2:26 am, dpinion dpin...@gmail.com wrote: Greetings, I am a bit new to cake, and am diving in via the cookbook. I have a simple app I am trying to develop, and am

Convert this Mysql Statement to a cakePHP find array

2009-07-14 Thread liaogz82
Hi all, I am having some difficulty finding a cakePHP solution to this MySQL statement: SELECT `id`, `issue_date` FROM icapsdb3.print_issues where id =2043 limit 45,1 Can somebody help me please? --~--~-~--~~~---~--~~ You received this message because you

Re: Convert this Mysql Statement to a cakePHP find array

2009-07-14 Thread jeff
to get a much clear idea http://book.cakephp.org/view/456/query On Tue, Jul 14, 2009 at 11:39 AM, liaogz82 liaog...@gmail.com wrote: Hi all, I am having some difficulty finding a cakePHP solution to this MySQL statement: SELECT `id`, `issue_date` FROM icapsdb3.print_issues where id

Re: Convert this Mysql Statement to a cakePHP find array

2009-07-14 Thread RC
all, I am having some difficulty finding a cakePHP solution to this MySQL statement: SELECT `id`, `issue_date` FROM icapsdb3.print_issues where id =2043 limit 45,1 Can somebody help me please? --~--~-~--~~~---~--~~ You received this message because you

Re: Convert this Mysql Statement to a cakePHP find array

2009-07-14 Thread Dr. Loboto
to this MySQL statement: SELECT `id`, `issue_date` FROM icapsdb3.print_issues where id =2043 limit 45,1 Can somebody help me please? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group

getting SQL statement

2009-05-05 Thread Krish
Hi, I want to see wat sql statement made in back by cake ORM? How can I get that? --~--~-~--~~~---~--~~ 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

  1   2   >