Re: Related lists, polymorphic habtm? (fao: AD7six ;))

2010-02-03 Thread AD7six
On Feb 3, 2:46 am, Jon Bennett jmbenn...@gmail.com wrote: Hi bakers, Been mulling this over and haven't hit on the ideal solution yet, so thought I'd try and put it down to get some outside ideas. I'm trying to find a flexible way to associate a record in one table with many other records

How to include an element in a view.

2010-02-03 Thread Pau
Hi. I'm traying to display in a view a string asociated to a field value. ?php $i = 0; foreach ($datas as $data): $class = null; if ($i++ % 2 == 0) { $class = ' class=altrow'; } switch ($data['Model']['field']) { case 'A': $varp = __('String1',true);

Re: checking whether a table exists

2010-02-03 Thread Lorenzo Bettini
Yes, I finally did that, and switch to the UpdatesController when the tables are in place. I noted that you use sql directly, and not schema files generated by cake console, don't you? cheers Lorenzo Miles J wrote: I had to do the same thing for my plugin. Simply dont use Models.

save default values when $this-data['field'] is empty

2010-02-03 Thread matzeh...@googlemail.com
Hi, what would you do if you want to save a default value and don´t want to predefine a input field? I tried with a custom validation rule but the return of it is true/ false not the corrected value. Is the best way to do this in an function in the controller? Greetings Check out the new

Re: save default values when $this-data['field'] is empty

2010-02-03 Thread Jeremy Burns
You could either add a hidden text field to the form or set $this-data['model']['field'] to the value in the controller before you do a save. Jeremy Burns jeremybu...@me.com (Skype) +44 208 123 3822 (jeremy_burns) (m) +44 7973 481949 (h) +44 208 530 7573 On 3 Feb 2010, at 10:16,

Re: save default values when $this-data['field'] is empty

2010-02-03 Thread matzeh...@googlemail.com
Thanks Jeremy, the best way to solve a problem is to explain to an other person :) 2 min after i wrote it I found following solution: foreach($this-data['mode'] as $v= $val){ if(empty($val)) unset($this-data['model'][$v]); } Then cake or better say MySql takes the default value Thanks

Re: Related lists, polymorphic habtm? (fao: AD7six ;))

2010-02-03 Thread Jon Bennett
Hi AD, I think what I want is a habtm that can connect to multiple models with some additional fields in the join table, but I'm not sure that's feasible, but hope it is. a join table with more than 2 fields is a model, and a model that can link to anything is (as you know) polymorphic.

Re: Associated Pagination

2010-02-03 Thread John Andersen
You probably need to add this to your view, so that any parameters in the URL is passed on to the paginator in the view. [code] $paginator-options(array('url' = $this-passedArgs)); [/code] See http://book.cakephp.org/view/166/Pagination-in-Views for the pagination setup in the view. Enjoy,

Re: Error in define HABTM relation with 'joinTable' and with 'with'

2010-02-03 Thread marco.rizze...@gmail.com
Is there someone that can help me about this? On 2 Feb, 19:02, marco.rizze...@gmail.com marco.rizze...@gmail.com wrote: Hi I'm working on a legacy system , i must to defina an HABTM relation between User and Group. In User model I have this:         var $hasAndBelongsToMany=array(          

Re: Problem with relations when recursive 1

2010-02-03 Thread John Andersen
As far as I can understand from your tables, and your own statement: Tuotteet hasOne Tekstit which hasMany Kaannokset. then the following associations should be defined: 1) Tuotteet hasOne Tekstit This means that Tekstit has a field named tuotteet_id if you follow the CakePHP conventions. But

Re: Advanced Install

2010-02-03 Thread John Andersen
Do you have a cake directory under cake1.2.6? If not, then rename the cake1.2.6 directory to cake and use: define('CAKE_CORE_INCLUDE_PATH',DS.'dev'.DS.'lib'); I have this directory setup: /cake /app1 /app2 /app3 and I use the following in the /appx/webroot/index.php to define the constants: ...

Re: Advanced Install

2010-02-03 Thread AD7six
On Feb 2, 11:07 pm, Dave make.cake.b...@gmail.com wrote: I am trying to set up multiple apps using 1 cake so i have currently: public_html/                 dev/                         libs/                                 cake1.2.6/                         site1/                          

help for installing cakephp in a linux public_html directory!!!

2010-02-03 Thread cherif_Gsoul
hi, i need help for installing cakephp in a linux's public_html directory exactly fedora 12, i put cakephp in that directory but it seems that the mod_rewrite doesnt work and i dont know how to enable it for public_html but it works very well in /var/www/html and i configured the console too .

Re: Error in define HABTM relation with 'joinTable' and with 'with'

2010-02-03 Thread Lorenzo Bettini
I'm not sure, but it looks like the problem is due to the table name which is in Italian, thus, it does not respect the conventions of cakephp; have you got a model for GroupsUser as well? I mean a real class for that model? In that case, you need to make sure that that class has the right

Re: Error in define HABTM relation with 'joinTable' and with 'with'

2010-02-03 Thread marco.rizze...@gmail.com
I think that the use of 'with' and 'joinTable' attributes is excatly for tha case where models tables don't respect the cake convention otherwise these attributes aren't useful On 3 Feb, 15:23, Lorenzo Bettini bett...@dsi.unifi.it wrote: I'm not sure, but it looks like the problem is due to the

Issues with Searchable Behavior and PHP 4.x.x

2010-02-03 Thread Mayank Singhal
Hi, I am trying to use Searchable Behaviour hosted here: http://code.google.com/p/searchable-behaviour-for-cakephp/ To initialize the search_index table with existing data, I have used this: http://code.google.com/p/searchable-behaviour-for-cakephp/issues/detail?id=1q=controllerReply No. 2 which

HABTM view: how to retrieve data in extra column?

2010-02-03 Thread sebb86
Hello, in my database, there is a HABTM association between model rooms and staffs. In my index-view of staffs, when i retrieve the data, i'd like to have an extra column for each datarow with all rooms, which belongs to the current staff(id). The join table contains room_id and staff_id and is

How to correct: double file-extension when i download something (media view)

2010-02-03 Thread sebb86
Hello, i almost solved my problem, but there is still a little fault. In one of my views i readout a database cell, with a text inside, e.g. 13.pdf (13.pdf = document_name). The little fault is, when i click on the text in the column (e.g. 13.pdf) a download-windows opens and the file i download

how to validate two unique fields together?

2010-02-03 Thread sebb86
Hello, my table **rooms** contains three fields: //id//, //building_id// and //room//. //Building_id// and //room// have to be UNIQUE together, because room 9 is in building 1 only one time but room 9 can also conained in building 2. The //building_id// in the view is realized as a drop-down

retrieve related model data (combination $hasOne and $belongsTo)

2010-02-03 Thread sebb86
Hello, I'd like to show the following things in my view (respectively in the field uplink_id in the view): attribute uplink_id from table ports with attribute schenker_number from table hardware_units. My problem are the associations, respectively i don't know the source code to retrieve the

Re: Advanced Install

2010-02-03 Thread Providence
This should be: define('CAKE_CORE_INCLUDE_PATH',DS.'dev'.DS.'lib'); On Feb 3, 6:07 am, Dave make.cake.b...@gmail.com wrote: I am trying to set up multiple apps using 1 cake so i have currently: public_html/                 dev/                         libs/                                

Re: Advanced Install

2010-02-03 Thread Massimiliano Bertinetti
I think the best solution is to have app1 app2 and so on in the root (same level of cake...) instead. Max-B Il giorno mar, 02/02/2010 alle 18.37 -0330, Dave ha scritto: I am trying to set up multiple apps using 1 cake so i have currently: public_html/ dev/

Cake 1.3-beta: cake schema doesn't accept the run param

2010-02-03 Thread Luigi Castro Cardeles
Hi, i am using cake 1.3.0-beta from git (git clone git://github.com/cakephp/cakephp1x.git and git checkout 1.3.0-beta). When using cake console, 'cake schema run create DbAcl' throws the default cake schema help but if i use 'cake schema create DbAcl' i was prompted to create acos, aros and

Re: Error after adding database.php file to project (happening on Windows and Ubuntu)

2010-02-03 Thread BrendonKoz
You probably could have found that particular error out had you checked the Apache error logs. I would suggest checking both CakePHP's error logs (app/tmp/logs/error.log), as well as your server's error logs to determine what could be the cause. If there are no errors on your Linux server,

Re: Weird problem with form that doesn't use model

2010-02-03 Thread BrendonKoz
If you want to validate the data input from that form, you'd still need to create a model class (and schema variable). You won't have to create a database table, but it might still be helpful to you to create the model class itself. On Jan 31, 5:33 am, Jules fattyju...@gmail.com wrote: Bingo!

Re: getClientIP ?? strange format...

2010-02-03 Thread BrendonKoz
That would only solve his testing methods here. If his host supports IPv6, it's still possible for him to get those values under his production site from visitors. It's best to account for both. On Feb 2, 11:24 am, Andras Kende and...@kende.com wrote: Tomas, You could try disable IPV6:  

Re: logins worked, now they fail

2010-02-03 Thread BrendonKoz
I don't have time at the moment to look through all of that (though I do appreciate your thoroughness). The first thing I would recommend is try disabling all of your redirects from your related (user?) controller's methods. By doing so, you should once again be able to see the SQL debug output

CakePHP CakeSchema question

2010-02-03 Thread Дмитрий Николаев
Hi! If there any manual or article on how use CakeShema? I'm interested in using models using bare sql in before() and after() methods. 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

Re: how to validate two unique fields together?

2010-02-03 Thread matzeh...@googlemail.com
take a look at: http://www.mail-archive.com/cake-php@googlegroups.com/msg33243.html they discussed the Problem an found a nice solution! On 3 Feb., 08:47, sebb86 kahlc...@googlemail.com wrote: Hello, my table **rooms** contains three fields: //id//, //building_id// and //room//.

Re: Bypassing validation

2010-02-03 Thread Craig Francis
Hopefully a slightly better method... I've created a custom AppModel that ensures that every field listed in the 'fieldList' during save (whitelist) has all of its rules set to 'required'... and it will also complain if the 'fieldList' isn't provided to the save() method. ?php class AppModel

Find help for $this-set(compact())

2010-02-03 Thread McScreech
Hello, Where do I find the definition or explanation of '$this-set(compact ())' in the Cookbook or API? Thanx, DaveT. 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

Re: Find help for $this-set(compact())

2010-02-03 Thread Jeremy Burns
It's actually a php function: http://php.net/manual/en/function.compact.php Jeremy Burns jeremybu...@me.com On 3 Feb 2010, at 16:16, McScreech wrote: Hello, Where do I find the definition or explanation of '$this-set(compact ())' in the Cookbook or API? Thanx, DaveT. Check out the

Re: how to validate two unique fields together?

2010-02-03 Thread BrendonKoz
I'm not sure I understand the problem directly, so I'll just try to give an example of how you can use the model class' custom validation methods to handle a validation of two fields at the same time. From the book, check out how to manage custom validations (http://

Re: HABTM view: how to retrieve data in extra column?

2010-02-03 Thread John Andersen
Do a foreach loop on the $staff['Room'] array in the table cell! Enjoy, John On Feb 3, 9:24 am, sebb86 kahlc...@googlemail.com wrote: Hello, in my database, there is a HABTM association between model rooms and staffs. In my index-view of staffs, when i retrieve the data, i'd like to have

Tree Behavior does not work with multiple parents?

2010-02-03 Thread sphereweb
Hello, I am somewhet a newbie to CakePHP. I am trying to migrate my website from own framework to CakePHP. Everything is wonderful until i got to tree behavior issue for categories. I will explain a little bit what i am trying to achieve: I have many categories that can have multiple parent

Re: Tree Behavior does not work with multiple parents?

2010-02-03 Thread Jon Bennett
hi ShereWeb, I am somewhet a newbie to CakePHP. I am trying to migrate my website from own framework to CakePHP. Everything is wonderful until i got to tree behavior issue for categories. I will explain a little bit what i am trying to achieve: I have many categories that can have multiple

Re: checking whether a table exists

2010-02-03 Thread Miles J
Yes straight SQL, as schema files are only really usable in the shell. On Feb 3, 2:06 am, Lorenzo Bettini bett...@dsi.unifi.it wrote: Yes, I finally did that, and switch to the UpdatesController when the tables are in place. I noted that you use sql directly, and not schema files generated by

Re: Cake 1.3-beta: cake schema doesn't accept the run param

2010-02-03 Thread Daniel S. Reichenbach
Hi, When using cake console, 'cake schema run create DbAcl' throws the default cake schema help but if i use 'cake schema create DbAcl' i was prompted to create acos, aros and aros_acos tables. is this the expected behavior? as stated in the Migration guide[1] this is indeed intended

Re: help for installing cakephp in a linux public_html directory!!!

2010-02-03 Thread Daniel S. Reichenbach
Hi, hi, i need help for installing cakephp in a linux's public_html directory exactly fedora 12, i put cakephp in that directory but it seems that the mod_rewrite doesnt work and i dont know how to enable it for public_html but it works very well in /var/www/html and i configured the console

Re: Plugin using different Dynamic Database Connection

2010-02-03 Thread Zaky Katalan-Ezra
Create a view in the database that select from the other database. This way you need only one connection. On Tue, Feb 2, 2010 at 7:58 PM, Bryan De Asis bryandea...@gmail.com wrote: Co'z I'm creating a database table which contains the database connection credentials so i can have thousands

Re: How to correct: double file-extension when i download something (media view)

2010-02-03 Thread John Andersen
The basename function returns the filename with the suffix! Try to change your code to: [code] $basename = basename($file); $file_extension = substr(strrchr($basename,.),1); $basename = basename($file, '.'.$file_extension); ... $this-set('extension', strtolower($file_extension));

Re: Plugin using different Dynamic Database Connection

2010-02-03 Thread Bryan De Asis
Sorry Zaky can you elaborate it more... what do you mean by create a view in the database that select from the other database? Thanks On Wed, Feb 3, 2010 at 3:45 PM, Zaky Katalan-Ezra procsh...@gmail.comwrote: Create a view in the database that select from the other database. This way you

Re: Plugin using different Dynamic Database Connection

2010-02-03 Thread Miles J
From an architecture standpoint, storing credentials in a database is a pretty bad idea. On Feb 3, 1:08 pm, Bryan De Asis bryandea...@gmail.com wrote: Sorry Zaky can you elaborate it more... what do you mean by create a view in the database that select from the other database? Thanks On

Does Cakephp support distributed database?

2010-02-03 Thread Arthas
Hi Guys I am working on a project with distributed database (5000 users per each). Can Cakephp support such system? Thanks 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

ACOs on aspects of controller actions

2010-02-03 Thread Chris
Hi there everyone. Newbie CakePHP individual here. This framework has really taught me the concepts of MVC, moreso than Drupal ever did, anyway. I have a question regarding the ACL component: I understand that the component restricts access of a requester object to a control object based on

HABT many saveAll problem with multiple child records,

2010-02-03 Thread waseem gondal
hi, I have scenario , where i want to save a meeting, and meeting has relation with topic habtm, Tables: Meeting, Topic, MeetingsTopics Meeting HABTM with Topic this sample data is working fine, [Meeting] = Array ( [date] = 2010-02-10 [Priority] = 1 )

Inner join querys: two fields from one table

2010-02-03 Thread andy
Hello, Sorry for the strangely-worded question title. I've been searching around for a few days here on the CakePHP doc book, CakePHP group, and around the Internet but I haven't been able to find a tip on how to do this. I have a MySQL database with these tables (names are simplified): +

Trouble Baking with MAMP

2010-02-03 Thread B_Fraser
I've spent a few hours on this so far and haven't had any luck. I've read all the previous posts but still no joy. When I attempt to bake I get: Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) in /Applications/MAMP/htdocs/cake/

Re: Inner join querys: two fields from one table

2010-02-03 Thread andy
I think I found an article that fixed this issue. It can be found here: http://bakery.cakephp.org/articles/view/quick-tip-doing-ad-hoc-joins-in-model-find I had read it before when searching... but didn't realize that it was what I had been looking for all along. Sorry for the misspelled querys

Re: help for installing cakephp in a linux public_html directory!!!

2010-02-03 Thread Jeff Deroshia
You can't rewrite in userDir directories, since they are already rewritten: http://httpd.apache.org/docs/2.0/misc/rewriteguide.html On Wed, Feb 3, 2010 at 9:20 AM, cherif_Gsoul cherif.sahel...@gmail.comwrote: hi, i need help for installing cakephp in a linux's public_html directory exactly

Re: Trouble Baking with MAMP

2010-02-03 Thread mariano
Use the bundled php bin from MAMP in your call to bake i.e. / Applications/MAMP/bin/php/php5/bin/php cheers. On Feb 3, 6:20 pm, B_Fraser baf...@gmail.com wrote: I've spent a few hours on this so far and haven't had any luck. I've read all the previous posts but still no joy. When I attempt

Form in element

2010-02-03 Thread Dave
I have a form in an element and wondering how to return back to the page it was sent from if its successful or if there are errors display the errors on the same page. Basically its a side menu and at the bottom a mini form to signup for newsletter which is on every page. So if the user adds

Re: Plugin using different Dynamic Database Connection

2010-02-03 Thread Bryan De Asis
everything is encrypted... On Wed, Feb 3, 2010 at 4:45 PM, Miles J mileswjohn...@gmail.com wrote: From an architecture standpoint, storing credentials in a database is a pretty bad idea. On Feb 3, 1:08 pm, Bryan De Asis bryandea...@gmail.com wrote: Sorry Zaky can you elaborate it more...

Re: How to include an element in a view.

2010-02-03 Thread Lance Willett
Hi Pau, Are you using 1.2? If so, $this-renderElement is deprecated and you should use $this-element instead. You can read up on elements at http://book.cakephp.org/view/97/Elements. But this specific situation sounds like a perfect task for a helper. Helpers (see

Quotes in options array

2010-02-03 Thread Furuno
Ok, so I want to pass an image from my custom file browser to CKEditor. Here, the code I'm using to draw the image in the file browser : ?php echo $html-image('pool/' . $image, array('width' = 155, 'onclick' = 'window.opener.CKEDITOR.tools.callFunction(' . $func_num . ', \'/mysite/img/pool/' .

validation strangeness

2010-02-03 Thread cricket
cake_1.2.6 I'm thoroughly confused by what's happening (or not happening) with my validation. For one thing, save() does not appear to be calling validate(). Even when I pass true as the 2nd param, validation does not occur. Secondly, the validation, when called explicitly, seems to be wrong.

Re: validation strangeness

2010-02-03 Thread cricket
Oops. I messed up the call to validate(). But, when I do ... if ($this-User-create($this-data) $this-User-validates()) { if ($this-User-save($this-data, true)) { ... validation passes! It should fail. WTF? Check out the new CakePHP Questions site http://cakeqs.org and help

Re: Associated Pagination

2010-02-03 Thread Changoso
Thanks a lot! [Resolved] :D :D On Feb 3, 4:56 am, John Andersen j.andersen...@gmail.com wrote: You probably need to add this to your view, so that any parameters in the URL is passed on to the paginator in the view. [code] $paginator-options(array('url' = $this-passedArgs)); [/code]

Re: validation strangeness

2010-02-03 Thread Jeremy Burns
This might not be the answer you are looking for, but when I have had similar issues before I have always debugged $this-data at various points to see what is actually being validated and saved. Then I double check the shape of the data against the save (and if necessary, saveAll) functions in

Re: Plugin using different Dynamic Database Connection

2010-02-03 Thread Zaky Katalan-Ezra
http://dev.mysql.com/doc/refman/5.0/en/federated-use.html On Wed, Feb 3, 2010 at 11:08 PM, Bryan De Asis bryandea...@gmail.comwrote: Sorry Zaky can you elaborate it more... what do you mean by create a view in the database that select from the other database? Thanks On Wed, Feb 3, 2010 at

app function

2010-02-03 Thread Dave
How do i run a function from app controller? in app_controller i have in beforeFilter { $this-buildNavigations(); } function buildNavigations() { $links = $this-Link-find('list'); //$links = $this-find('list'); } Resilts in: Undefined property: PagesController::$Link I

Re: validation strangeness

2010-02-03 Thread cricket
I did debug the data; it was fine. My usual first strategy also :-) The answer was 'on' = 'create', not 'add'. On Feb 4, 12:32 am, Jeremy Burns jeremybu...@me.com wrote: This might not be the answer you are looking for, but when I have had similar issues before I have always debugged

Re: How to correct: double file-extension when i download something (media view)

2010-02-03 Thread sebb86
John Hello, thanks for your answer! :) I've added your code. Well, I found out, that my old code (same result with your code) also works, but only with 3 of my 4 test-data-rows. It works for '13.pdf', '288.pdf' and '3.pdf'. It fails for '19.pdf' (result on click = 19.pdf.pdf) and i absolutely

Re: How to correct: double file-extension when i download something (media view)

2010-02-03 Thread sebb86
John Hello, thanks for your answer! :) I've added your code. Well, I found out, that my old code (same result with your code) also works, but only with 3 of my 4 test-data-rows. It works for '13.pdf', '288.pdf' and '3.pdf'. It fails for '19.pdf' (result on click = 19.pdf.pdf) and i absolutely

Re: How to correct: double file-extension when i download something (media view)

2010-02-03 Thread sebb86
John Hello, thanks for your answer! :) I've added your code. Well, I found out, that my old code (same result with your code) also works, but only with 3 of my 4 test-data-rows. It works for '13.pdf', '288.pdf' and '3.pdf'. It fails for '19.pdf' (result on click = 19.pdf.pdf) and i absolutely

Re: app function

2010-02-03 Thread Miles J
You must have the model Link defined and loaded before you run your navigation method. On Feb 3, 9:38 pm, Dave make.cake.b...@gmail.com wrote: How do i run a function from app controller? in app_controller i have  in beforeFilter { $this-buildNavigations(); } function buildNavigations()  

Re: HABTM view: how to retrieve data in extra column?

2010-02-03 Thread sebb86
John Hello, i tryed: [code] td?php foreach ($staffs as $i): ? ?php echo $staff['Room'][$i]['description']; ? , ?php endforeach; ?/td [/code] But with that code i get the following error-message: Warning (2): Illegal offset type [APP\views\staffs\index.ctp, line 40]. Where

RE: app function

2010-02-03 Thread Dave
I tried using App Import model set up but got the same error message. Is that what you mean? -Original Message- From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf Of Miles J Sent: February-04-10 3:39 AM To: CakePHP Subject: Re: app function You must have the

Re: help for installing cakephp in a linux public_html directory!!!

2010-02-03 Thread cherif_Gsoul
thank you i apperciate your help. On 3 fév, 18:58, Daniel S. Reichenbach daniel.s.reichenb...@mac.com wrote: Hi, hi, i need help for installing cakephp in a linux's public_html directory exactly fedora 12, i put cakephp in that directory but it seems that the mod_rewrite doesnt work and i

Re: help for installing cakephp in a linux public_html directory!!!

2010-02-03 Thread cherif_Gsoul
thank you very much. On 3 fév, 23:41, Jeff Deroshia deros...@gmail.com wrote: You can't rewrite in userDir directories, since they are already rewritten:http://httpd.apache.org/docs/2.0/misc/rewriteguide.html On Wed, Feb 3, 2010 at 9:20 AM, cherif_Gsoul cherif.sahel...@gmail.comwrote: hi,

Doing CakePHP 1.2.x in PHP 5 way

2010-02-03 Thread Okto Silaban
Can I refere to a complete documentation how can I work with strict PHP5 on CakePHP? For example : Can I remove beforeFilter() and use __construct() instead ? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this

Re: Form in element

2010-02-03 Thread John Andersen
If I understand you correctly Dave, then you have a page A on which is a newsletter signup form. When the user submits an e-mail address, you want to present the user to page B if the e-mail address is valid. If the e-mail address is not valid, stay on page A. Correct? Assuming I am correct :)

Re: Doing CakePHP 1.2.x in PHP 5 way

2010-02-03 Thread Miles J
beforeFilter() isn't a constructor. Its just a normal method, which is used as a callback. You should never overwrite the constructor as it has important code. That's what the callbacks are for, to define custom code to not conflict. Also, this has nothing really to do with PHP 4 or 5, its a

Re: HABTM view: how to retrieve data in extra column?

2010-02-03 Thread John Andersen
No, not that way, you have to use your existing code and use an inner loop, example: [code] ?php foreach ($staffs as $staff): ? - your outer loop! Good! ... ... td ?php foreach($staff['room'] as $room): ? - the inner loop! ?php echo $room['description'].'; '; ? /td ... [/code]

Re: How to correct: double file-extension when i download something (media view)

2010-02-03 Thread John Andersen
I suggest you turn on debug and add some debug statements in between your code, so you can see what the content of each variable is at specific places. Debug is turned on in your core.php file in the config directory. Use debug statements: debug($basename); debug($file_extension); and maybe some