Export MySQL tables into EZ publish classes.

Author Message

Simon Caisse

Monday 28 November 2005 5:25:25 pm

Is it possible to export MySQL tables into EZ publish classes?

I have MySQL tables with data that was not created by EZ that I would like to be displayed into EZ publish.

I know how to create new classes in EZ but is there a way to populate these 'classes' with the data I already have on MySQL tables?

Ɓukasz Serwatka

Thursday 01 December 2005 12:29:45 am

Hi Simon,

It is possible to fetch from database and display result in templates. You have to write new fetch function, it is not so difficult and well documented example you can find here:

http://ez.no/products/ez_publish_cms/documentation/development/extensions/module/module_tutorial_part_1

However if you want to present data using objects, read this topic, and it will give you some light how create objects pragmatically:

http://ez.no/community/forum/install_configuration/how_to_create_ezcontentobject_programmatically

You can also learn more from eZ publish book:
http://ez.no/products/books/ez_publish_book

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Simon Caisse

Thursday 01 December 2005 5:45:45 pm

That's exactly what I was looking for. Thank you very much for your help. Much appreciated

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

eZ debug

Timing: Jan 31 2025 06:14:59
Script start
Timing: Jan 31 2025 06:14:59
Module start 'layout'
Timing: Jan 31 2025 06:14:59
Module start 'content'
Timing: Jan 31 2025 06:14:59
Module end 'content'
Timing: Jan 31 2025 06:14:59
Script end

Main resources:

Total runtime0.0152 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 588.2656151.2266
Module start 'layout' 0.00520.0030 739.492236.6797
Module start 'content' 0.00820.0055 776.171990.1875
Module end 'content' 0.01370.0015 866.359429.9922
Script end 0.0152  896.3516 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002415.9496140.0002
Check MTime0.00106.8839140.0001
Mysql Total
Database connection0.00085.014410.0008
Mysqli_queries0.002416.104930.0008
Looping result0.00000.144310.0000
Template Total0.00106.910.0010
Template load0.00085.558610.0008
Template processing0.00021.315910.0002
Override
Cache load0.00063.828610.0006
General
dbfile0.00096.203280.0001
String conversion0.00000.065940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs