Click Fraud Protection
PHP related blog, freelancer to hire!

Posts Tagged Zend Framework

How to access magento search results externally (Drupal, Joomla, Zend Framework, Symfony etc)

Blast Search Lucene module enables you to get superquick results delivered to external application Options are: 1) if applications are on the same server you can simply include Magento code and use module method:   $queryText = ‘stainless’; $storeId = 1; $mageFilename = ‘../path_to_your_magento_document_root/app/Mage.php’; require_once $mageFilename; umask(0); […]

Read more

Zend Paginator – how to access objects, not data only

If you’re using Zend_Paginator, I’m sure on some point you’ll need to access your object instead of only data.   First of all you need to have your Zend_Db_Table defined with rowchild, for example if your table class is App_Model_Db_Books, add this variable protected $_rowClass = ‘App_Model_Db_Books_Row’; […]

Read more

MS SQL Server 2008 connection from ZF problem? SOLVED

If you have message like ‘General error: 20018 Unicode data in a Unicode-only collation or ntext data cannot be sent to clients using DB-Library (such as ISQL) or ODBC version 3.7 or earlier.’ probably one of your columns is invalid. In my scenario i had one column […]

Read more

Use PHP and PDO to connect to MS SQL Server (Zend Framework)

Problems connecting to MS SQL server from Zend Framework? Message: The mssql driver is not currently installed Solution is simple Install pdo_mssql driver: (Ubuntu) #sudo apt-get install php5-sybase #sudo /etc/init.d/apache2 restart On Centos you need to install pdo_dblib (any problems check here) It will not reflect in […]

Read more

Zend_db_table how to find row by multiple columns?

Maybe should dig more in ZF API, but found simple solution: class YourClass extends Zend_Db_Table_Abstract { public function findOneByParams(array $params) { // prepare query $query = $this->select(); // add our terms foreach ($params as $param => $value) { $query->where($param.’ = ?’, $value); } // find row $row […]

Read more

Zend Framework on-line tutorials/documentation

Last time I was using ZF when it was something around 1.5, so I was quite shocked when downloaded version 1.7 and started to use it. Documentation is quite ok, when you know what you want to do, but of course it is better when someone else […]

Read more

HTML code in Zend Forms description

If you want to use HTML as description in Zend Forms use : $name = new Zend_Form_Element_Text(‘fullname’); $name->setLabel(‘Full name:’); $name->setDescription(‘Find customer’);

Read more