phalcon

Phalcon performance related queries

送分小仙女□ 提交于 2019-11-28 00:26:23
I'm building a REST API for the output of endpoint /projects I have created 2 models: Projects: class Projects extends BaseModel { public function initialize() { $this->hasMany('id', 'Participants', 'projectId'); } } Participants: class Participants extends BaseModel { public function initialize() { $this->belongsTo('projectId', 'Projects', 'id'); } } Lets say, I have 10 projects: (1 query) $results = Projects::find(); I loop through all 10 of them, but I want all Participants too: foreach($results as $result) { echo $result->participants; // 1 query } So at the end of the loop Phalcon has

Error building : fatal error: pcre.h: No such file or directory

末鹿安然 提交于 2019-11-27 07:09:33
I'm just finished installing Ubuntu 13.10. I want try Phalcon, and when I build the source (phalcon.so), I have this error : from /home/fabrice/Downloads/cphalcon/build/32bits/phalcon.c:204: /usr/include/php5/ext/pcre/php_pcre.h:29:18: fatal error: pcre.h: No such file or directory #include "pcre.h" ^ compilation terminated. make: *** [phalcon.lo] Erreur 1 My installation of lamp is : sudo apt-get install -y apache2 php5 mysql-server libapache2-mod-php5 php5-mysql php5-curl php5-imagick php5-mcrypt php5-memcache php5-sqlite php5-xdebug php-apc php5-intl php-mongo php5-dev gcc Can anybody help

Phalcon performance related queries

我只是一个虾纸丫 提交于 2019-11-26 21:41:29
问题 I'm building a REST API for the output of endpoint /projects I have created 2 models: Projects: class Projects extends BaseModel { public function initialize() { $this->hasMany('id', 'Participants', 'projectId'); } } Participants: class Participants extends BaseModel { public function initialize() { $this->belongsTo('projectId', 'Projects', 'id'); } } Lets say, I have 10 projects: (1 query) $results = Projects::find(); I loop through all 10 of them, but I want all Participants too: foreach(