Symfony is a PHP Framework. It uses Propel to achieve outstanding (really?) workflow possibilities, making database-based websites easy and fast to develop. At least let's hope so…
Edit the memory limit. 16MB (default) seems to be not enough.
sudo vim /etc/php5/apache2/php.ini
and
sudo vim /etc/php5/cli/php.ini
memory_limit = 128M
sudo pear channel-discover pear.symfony-project.com sudo pear install symfony/symfony-1.2.7
symfony -V should show version 1.2.7
Needed for some unit-tests:
sudo aptitude install php5-xdebug
symfony configure:database "<dbtype>:dbname=<dbname>;host=<host>" <login> <password><dbtype> - mysql, pqsql, …
symfony propel:build-sqlsymfony propel:insert-sqlsymfony propel:data-load (loads fixtures from data/fixtures)mysql -h <host> -u <user> -p <dbname> < data.sql (data only contains inserts)symfony propel:build-model creates new schema.yml from the layout of the DB
symfony -V reveals the path of the framework, e.g. /usr/share/php/symfony
In Netbeans create a new project using existing project directory. Navigate the folder where the project is stored in. The path to the framework has to be added to the include path in Netbeans to get code completation to work properly.
<?php // BlaPeer.class.php static public function getAverageColumn(PropelPDO $con = null) { if($con === null) { $con = Propel::getConnection(BlaPeer::DATABASE_NAME, Propel::CONNECTION_READ); } $stmt = $con->prepare('SELECT AVG(' . BlaPeer::POTENZIAL . ') FROM ' . BlaPeer::TABLE_NAME); $stmt->execute(); return $stmt->fetchColumn(); } // call i.e.: $avg = BlaPeer::getAveragePotenzial(); ?>
//Smallest Value <?php $c = new Criteria(); $c->add(BlaPeer::Bla_ID, $this->getId()); $c->addAscendingOrderByColumn(BlaPeer::COLUMN); return BlaPeer::doSelectOne($c); ?>