20,352
questions
100
votes
16
answers
333k
views
how to create virtual host on XAMPP [duplicate]
I am sure this question is being asked many times but I am not encounter with a problem. I am using XAMPP where I configure Zend framework.
XAMPP is running on port 8081 as 80 is being occupied by ...
85
votes
5
answers
74k
views
Is en_UK an illegal locale?
So far I had always used 'en_UK' for British English. Today I got an error when using it with Zend Framework because the locale is not included in the long list of recognized locales.
Here's just a ...
79
votes
14
answers
141k
views
How to print exact sql query in zend framework ?
I have the following piece of code which i taken from model,
...
$select = $this->_db->select()
->from($this->_name)
->...
69
votes
6
answers
46k
views
How to create WHERE IN clause with Zend_Db_Select
So I am trying to accomplish something like this:
SELECT * FROM table WHERE status_id IN (1,3,4);
using Zend_Db_Select... can't find how to do it :( Is it at all possible?
69
votes
7
answers
124k
views
Starting with Zend Tutorial - Zend_DB_Adapter throws Exception: "SQLSTATE[HY000] [2002] No such file or directory"
I have started to learn Zend Framework with the Book "Zend Framework in Action" in German.
Right there where it starts to get interesting, my PHP Unit Test throws this Error:
"...
64
votes
10
answers
39k
views
Running a Zend Framework action from command line
I would like to run a Zend Framework action to generate some files, from command line. Is this possible and how much change would I need to make to my existing Web project that is using ZF?
Thanks!
64
votes
2
answers
23k
views
How can I make email template in Zend Framework?
I want to make email templates in Zend Framework.
For example,
<html>
<body>
Dear {$username$},<br>
This is a invitation email sent by your {$friend$}.<br>
Regards,<br>
...
64
votes
1
answer
37k
views
Zend Framework 1 vs Zend Framework 2 performance [closed]
Zend Framework 2 was just released and Zend offers support for ZF1 for only 18 months from now. I know they were working for new features in ZF2 and then they were going to do some major speed ...
62
votes
4
answers
65k
views
Change an associative array into an indexed array / get an Zend_Table_Row_Abstract as non-associative
Hi out there in Stackland. I was wondering if there was either a function or an easy way to change an associative array into an indexed array.
To elaborate, I'm using the Zend framework, and I've ...
60
votes
2
answers
44k
views
How to switch layout files in Zend Framework?
I'm sure it's a simple one-liner, but I can't seem to find it.
How can I use a different layout file for a particular action?
Update: This worked for me, thanks!
// Within controller
$this->...
55
votes
14
answers
117k
views
Running MySQL *.sql files in PHP
I have two *.sql files that I use when creating a new web site database. The first file creates all the tables. The second file populates some default records. I would like to execute these files ...
52
votes
4
answers
86k
views
Set Application_ENV via virtual host config and read this in PHP
I like how this works in Zend Framework. I can know which environment I'm currently using by checking APPLICATION_ENV constant in my controller.
<VirtualHost *:80>
#ServerName
#...
50
votes
11
answers
55k
views
Zend Framework: How do I remove the decorators on a Zend Form Hidden Element?
I'm trying to remove the default decorators on a hidden form element. By default, the hidden element is displayed like this:
<dt>Hidden Element Label (if I had set one)</dt>
<dd><...
49
votes
7
answers
27k
views
Is there a way to do an "INSERT...ON DUPLICATE KEY UPDATE" in Zend Framework 1.5?
I would like to use ON DUPLICATE KEY UPDATE in Zend Framework 1.5, is this possible?
Example
INSERT INTO sometable (...)
VALUES (...)
ON DUPLICATE KEY UPDATE ...
44
votes
4
answers
29k
views
safely get array element value for defined and undefined indexes
I'm getting tired of writing ternary expressions to sanitize the data, things like:
$x = isset($array['idx']) ? $array['idx'] : null;
// and
$x = !empty($array['idx']) ? $array['idx'] : null;
Is ...