Empty resultset when using Phalcon\Mvc\Model\Query\Builder



83.4k

Hi, What version are you using?



83.4k

Can you check if a SELECT COUNT(*) is being generated for the SELECT * FROM RADIO_PACKAGE?

If I understood you correctly, it's sql log for "$packages = Package::find();"

[Fri, 21 Jun 13 19:03:46 +0400][INFO] SELECT CASE WHEN COUNT(*) > 0 THEN 1 ELSE 0 END RET FROM ALLTABLES WHERE TABLENAME='RADIOPACKAGE' AND OWNER = 'RADIO' [Fri, 21 Jun 13 19:03:46 +0400][INFO] SELECT TC.COLUMNNAME, TC.DATATYPE, TC.DATALENGTH, TC.DATAPRECISION, TC.DATASCALE, TC.NULLABLE, C.CONSTRAINTTYPE, TC.DATADEFAULT, CC.POSITION FROM ALLTABCOLUMNS TC LEFT JOIN (ALLCONSCOLUMNS CC JOIN ALLCONSTRAINTS C ON (CC.CONSTRAINTNAME = C.CONSTRAINTNAME AND CC.TABLENAME = C.TABLENAME AND CC.OWNER = C.OWNER AND C.CONSTRAINTTYPE = 'P')) ON TC.TABLENAME = CC.TABLENAME AND TC.COLUMNNAME = CC.COLUMNNAME WHERE TC.TABLENAME = 'RADIOPACKAGE' AND TC.OWNER = 'RADIO' ORDER BY TC.COLUMNID [Fri, 21 Jun 13 19:03:46 +0400][INFO] SELECT "RADIOPACKAGE"."RADIOPACKAGEID", "RADIOPACKAGE"."RADIOPACKAGETITLE", "RADIOPACKAGE"."RADIOPACKAGEBODYORIG", "RADIOPACKAGE"."RADIOPACKAGEBODYREWRITE", "RADIOPACKAGE"."RADIOPACKAGEANNOUNCE", "RADIOPACKAGE"."RADIOPACKAGESTATUSID", "RADIOPACKAGE"."RADIOPACKAGEFILENAME", "RADIOPACKAGE"."RADIOPACKAGEDATECREATED", "RADIOPACKAGE"."RADIOPACKAGEDATEMODIFIED", "RADIOPACKAGE"."RADIOPACKAGEAIRSTARTDATE", "RADIOPACKAGE"."RADIOPACKAGEAIRSTOPDATE", "RADIOPACKAGE"."RADIOPACKAGEAIRPERIOD", "RADIOPACKAGE"."RADIOPACKAGEDISCLAIMER", "RADIOPACKAGE"."RADIOPACKAGECOMMENT", "RADIOPACKAGE"."RADIOHOTDOGID", "RADIOPACKAGE"."RADIOUSER", "RADIOPACKAGE"."RADIOPACKAGEISACTIVE" FROM "RADIO"."RADIO_PACKAGE



83.4k

Can you try compiling again from the 1.2.0 branch?, I added a fix for this

NOTICE: Phalcon\Db\Result\Pdo::numRows(): Undefined index: 0

Stacktrace (most recent call first):

File "/home/mingalevme/projects/radio/app/controllers/PlaylistController.php", line 12, in {closure} $rows = Package::find(); File "/home/mingalevme/projects/radio/app/controllers/PlaylistController.php", line 12, in indexAction $rows = Package::find(); File "/home/mingalevme/projects/radio/public/index.php", line 300, in null $application->handle()->send();