How can I make database connection to retreive my data in tpl?

Author Message

Rizwan Ahmad

Friday 11 July 2003 5:21:52 am

I can create a table in mysql "nextgen". Now my question is how can I make the database connection and retreive the data in the tpl. How can I develop database driven application using ez Publish

Plz. help

Karsten Jennissen

Friday 11 July 2003 5:42:47 am

If you just want to get data from the current structure you can use the fetch function.

http://ez.no/developer/ez_publish_3/documentation/customization/tips_tricks/fetch_function_examples

If you have something, that cannot be solved with the flexible data structures of eZ publish, you can write your own extension.

http://ez.no/developer/ez_publish_3/documentation/development/extensions

Karsten

Rizwan Ahmad

Monday 14 July 2003 12:36:30 am

Can I use my sql query in the fetch statement as well

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 18 2025 19:38:51
Script start
Timing: Jan 18 2025 19:38:51
Module start 'layout'
Timing: Jan 18 2025 19:38:51
Module start 'content'
Timing: Jan 18 2025 19:38:52
Module end 'content'
Timing: Jan 18 2025 19:38:52
Script end

Main resources:

Total runtime0.7370 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0064 588.1719152.6563
Module start 'layout' 0.00640.0030 740.828139.5078
Module start 'content' 0.00940.7262 780.3359464.6797
Module end 'content' 0.73560.0014 1,245.01568.0938
Script end 0.7370  1,253.1094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.4386160.0002
Check MTime0.00130.1814160.0001
Mysql Total
Database connection0.00080.104210.0008
Mysqli_queries0.699994.9605570.0123
Looping result0.00050.0641550.0000
Template Total0.710296.420.3551
Template load0.00190.254920.0009
Template processing0.708496.110020.3542
Template load and register function0.00020.030710.0002
states
state_id_array0.00070.095710.0007
state_identifier_array0.00070.098820.0004
Override
Cache load0.00150.2063130.0001
Sytem overhead
Fetch class attribute can translate value0.00060.085820.0003
Fetch class attribute name0.00090.124330.0003
XML
Image XML parsing0.00020.026620.0001
class_abstraction
Instantiating content class attribute0.00000.000930.0000
General
dbfile0.00060.0863100.0001
String conversion0.00000.001240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 8
 Number of unique templates used: 4

Time used to render debug report: 0.0001 secs