News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

MaltBlue.com:
ZendDbSql - Creating Joins and Unions with Ease
July 01, 2013 @ 09:41:51

On the MaltBlue.com blog Matthew Setter has a new post about the ZendDbSql component of Zend Framework 2, specifically related to making easy joins and unions. This is the second part of his series on this component.

In the first part of this series on ZendDbSqlSelect, we jumped the gun a bit and went straight in to looking at building Where clauses. We looked at a number of the predicates that are available to us, such as In, Between and EqualTo and saw just how easy ZendDbSqlSelect makes both building and maintaining queries. In this, the second part, we're backtracking a bit and looking at Joins and a slightly more esoteric feature of SQL - UNIONs. By the end of today's tutorial, you'll be building some pretty good queries that should satisfy most of your daily requirements.

He starts with a look at joins, showing in several code examples the various kinds - inner, outer, left and right (as well as self joins). He then moves on to unions, intersects and excerpts with examples of each.

0 comments voice your opinion now!
zendframework2 tutorial sql db tutorial join union

Link: http://www.maltblue.com/tutorial/zend-db-sql-creating-joins-and-unions-with-ease

Rob Allen's Blog:
One-to-Many Joins with Zend_Db_Table_Select
February 08, 2012 @ 09:28:20

Rob Allen has a tip for the Zend Framework users out there using the Zend_Db module to connect to their database resources - how to do a one to many join with the help of Zend_Db_Table_Select (easier than it sounds).

Let's say that you want to set up a one-to-many relationship between two tables: Artists and Albums because you've refactored my ZF1 tutorial. [...] Assuming you're using Zend_Db_Table, the easiest way is to turn off the integrity check and do a join in a mapper or table method.

He includes a few lines of source to illustrate, calling the "setIntegrityCheck" value to "false" to tell ZF not to worry about the additional join value over to the artists table. The result is a new column value with the artist's name instead of just the ID.

0 comments voice your opinion now!
onetomany database table join zendframework zenddb component


Anna Filina's Blog:
Doctrine Translation in leftJoin()
April 26, 2010 @ 11:39:33

In a recent post to his blog Anna Filina looks at internationalization in Doctrine and how Symfony auto-builds things to take care of it for you.

If you use Doctrine, then you probably know how lazy loading can hurt your performance. I carefully craft every query to everything that I need in one shot, but only what I need. One thing that evaded me at first was the i18n part. I am pleased with the way Doctrine + symfony magically creates all my models and database tables with i18n support.

She talks a bit about the internationalization (i18n) support is put into the schema.yml file and the bit of confusion she had over how to handle a left join using its structure. The key lies in the Translation relationships.

0 comments voice your opinion now!
doctrine translation left join i18n internationalization


Keith Casey's Blog:
Joining a Startup
December 31, 2009 @ 11:19:54

Many software developers (the ones that haven't been in on a start-up usually) are tempted to make the jump into the seemingly glamorous start-up world to build that next killer web app. Keith Casey has posted a bit of a reality check for developers thinking of making the move.

In the last few weeks, I've talked with a number of friends about career changes. Some are feeling antsy and just want to move, others are starting their own consulting, and others are starting and joining startups. While I've done all the above - to varying levels of failure success - I thought I'd share the things I've learned along the way.

He gives six things to keep an eye out for when considering your entry into the startup world:

  • Everyone does everything
  • There's no career path
  • You never have enough money
  • v1.0 never looks like the original Vision
  • Every founder believes in him/herself
  • Most startups don't explode, they fizzle

He's not saying all of this to push you away from startups, though - more to help you go in "with eyes open" and ready to ask the harder questions before you get into a bad situation.

0 comments voice your opinion now!
startup join advice opinion


Micheal Kimsal's Blog:
Symfony __toString() generation
August 20, 2008 @ 11:14:50

Michael Kimsal has pointed out a small irritation when using the Symfony framework and models - an issue when using models that have relationships.

If there are relations (an Author has a Book, for example). the generated forms will complain that the generated Models need a __toString() method to be used in the Form/View. In grails, this is the case, but every domain (corresponding to a Symfony 'model') has an implicit toString() method already generated, which return the string ":". For most production work, you'll want to override it with whatever you need the string to read, but for prototyping, it's fine.

He went in and modified the Symfony core to add in a __toString call that would return the object correctly. Several of the commentors agree with his frustration and some of the Symfony developers even chime in with some of the reasoning behind why it's like that.

0 comments voice your opinion now!
symfony tostring generation model issue join


Patrick Reilly's Blog:
Join the PHP Evangelism Team - Mailing List
October 17, 2007 @ 13:31:00

Patrick Reilly has posted about a new group that's being formed in the PHP world - a PHP Evangelism Team designed to help promote the language.

The goal of the PHP Evangelism Team is to bring together the right people, resources and experience from across the PHP Community to provide developers with the process guidance and best practices needed to create new opportunities for the web.

They're also looking to help support local user groups and aid in any PHP-related event they can. You can subscribe to their mailing list to get more information as the group develops. Check out the post for the address to join the list.

0 comments voice your opinion now!
team evangelism join mailinglist usergroup support resources team evangelism join mailinglist usergroup support resources


IBM developerWorks:
Turn SQL into XML with PHP
July 25, 2007 @ 09:21:00

On the IBM developerWorks site today, there's a new tutorial by Vikram Vaswani walking through the use of the XML_Query2XML PEAR package to pull data from your SQL database and push it into an XML structure.

Ever wished for an easy way to transform SQL result sets into XML? It's a PEAR package named XML_Query2XML, and it provides a comprehensive framework to efficiently turn the results of a database query into a customizable XML document. This article introduces the package, and demonstrates useful real-world applications, including using it with XSL and XPath, combining it with data from external Web services, and creating database dump files.

They go through the installation and the steps to create the XML:

  • Convert SQL to XML
  • Transform XML output with XSL
  • Customize XML output
  • Work with SQL joins
  • Filter SQL records with XPath
  • Merge data from multiple sources
  • Create database backups

Check out the full tutorial for an excellent guide to using this powerful PEAR package.

0 comments voice your opinion now!
pear xmlquery2xml xsl xpath join install backup pear xmlquery2xml xsl xpath join install backup


Splitbrain.org:
Joining .WAVs with PHP
November 27, 2006 @ 08:50:00

In this new post from the splitbrain.org website (creators of the Dokuwiki application), there's an example of how to join wav files together with PHP with a quick and easy script.

I'm currently working on a CAPTCHA plugin for DokuWiki and thought about providing audio output for users not able to see the image. This is pretty simple for CAPTCHAs - there is no need for complicated speech synthesis because you only need recordings of the 26 possible letters. But you need a way of joining those recordings on the fly...

There was an example he found previously, but it seemed like overkill, so he rolled together his own solution - a 24 line script that takes in the filenames of the wav files and spits back out the joined resource. This functionality has already been added to the CAPTCHA plugin if you'd like to check it out.

0 comments voice your opinion now!
join wav file audio captcha function file join wav file audio captcha function file



Community Events





Don't see your event here?
Let us know!


interview introduction podcast wordpress language threedevsandamaybe application api developer list laravel library symfony bugfix configure install code release series community

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework