Archive for January, 2007

Quickstart: DOM Tree building

Posted on January 15, 2007. Filed under: Quick Start |

1. Document object:
$dom = new DomDocument;
2 . Element:
$docElement = $dom->createElement(‘root’) ;
$dom->appendChild($docElement) ;
3. Set attribute:
$docElement->setAttribute(‘attrname’, ‘attrvalue’);
4. Element with textual content:
$para = $dom->createElement(‘p’, ‘Lorem ipsum dolor…’) ;
5. Append child:
$docElement->appendChild($para);
6. Import node:
$import = $dom->importNode($foreignNode, true);
If the second argument is set to true the subtree under $foreignNode will be imported, too. Now append the node named $import (see [...]

Read Full Post | Make a Comment ( None so far )

Quickstart: Zend_Session

Posted on January 14, 2007. Filed under: Quick Start, Zend Framework |

Bootstrap:
Zend::register(’session’, new Zend_Session());
Write some value
Zend::registry(’session’)->value = $value;
Read some value
$value = Zend::registry(’session’)->value;
Use isset
if(!isset(Zend::registry(’session’)->value)) {
Zend::registry(’session’)->value = $value;
}

Read Full Post | Make a Comment ( 1 so far )

SQL Joins

Posted on January 12, 2007. Filed under: SQL |

As somewhat of a follow-up to my previous post, Introduction to Developing a Relational Database, I’ll touch on the exciting subject of joining tables together. This should help tie in some of the “relational” aspects of the relational database.
Very nice artice about INNER JOIN, LEFT OUTER JOIN, RIGHT OUTER JOIN and FULL OUTER JOIN with [...]

Read Full Post | Make a Comment ( None so far )

  • Bookmarks

Liked it here?
Why not try sites on the blogroll...