Manual SQL?

Manual SQL?

Tuesday 23 November 2004 2:15:21 pm - 2 replies

Author Message

Lazaro Ferreira

Tuesday 23 November 2004 10:44:19 pm

Hi,

AFAIK, the standard way to do it, is creating an extension in PHP, there you could call ezpublish API to fetch your data

if you want to handle directly the SQL, you can take a look a kernel/classes/ezcontentobjecttreenode.php it has the methods used by EZP itself to fecth list, subtree ,etc

Also turning sqldebug setting on (look for it at ezp site.ini) could be a good ideia to make easier to you understand ezp queries

You can also work at a higher level using the ezp php interface to templates ( .tpl code ). This is implemented at content/ezcontentfunctioncollection.php , the advantage of using this classes, is that you won't have to managed all of ezp complexity, there you take language and permission support for free, in the other hand some complex queries could't be done there directly

In conclusion, if you have created you our own databases tables, you will have to program the queries to your data manually (I don't know of any other way),

if you aren't creating any database table of your own, then you don't necessarily need to program SQL queries directly, at least that you were looking for some complex query (i.e: filtering by attributes in more than one content class object at the same time)

Lazaro
http://www.mzbusiness.com

Deane Barker

Wednesday 24 November 2004 2:11:36 am

Lazaro:

Good information, and enough for me to get a start in the right direction. Thank you for your help.

Deane

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.