Req #16029 [Opn->Fbk]: Handling Views

From: Date: Sun, 29 Mar 2009 16:54:27 +0000
Subject: Req #16029 [Opn->Fbk]: Handling Views
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-278@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=16029&edit=1 ID: 16029 Updated by: l.alberton@quipo.it Reported By: michael at stellarent dot com Summary: Handling Views -Status: Open +Status: Feedback Type: Feature/Change Request Package: MDB_QueryTool Operating System: Fedora 6 Package Version: 1.2.2 PHP Version: 5.2.5 Roadmap Versions: New Comment: -Status: Open +Status: Feedback Previous Comments: ------------------------------------------------------------------------ [2009-03-29 17:17:30] quipo Can I see your VIEW definition? Did you set an alias for the COUNT(b.offer_id) field? ------------------------------------------------------------------------ [2009-03-12 21:31:52] mpgjunky Description: ------------ Hi, I think the class is missing the ability to handle views. I tried to see if it can cope with one, but the select build function generates an sql that fails, as shown: SELECT v_jobsbycategories.job_category AS job_category,v_jobsbycategories.count(b.offer_id) AS count(b.offer_id) FROM v_jobsbycategories The view I used is simple. Two columns, two tables joined, and a group by for count() column. Test script: --------------- Just use any view you want. Expected result: ---------------- Perhaps we should have an option to stop the select build function? So the above sql would be: SELECT * FROM v_jobsbycategories Don't know, just a suggestion. Actual result: -------------- SELECT v_jobsbycategories.job_category AS job_category,v_jobsbycategories.count(b.offer_id) AS count(b.offer_id) FROM v_jobsbycategories ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=16029&edit=1

« previous php.pear.bugs (#278) next »