Custom Database Tables

Author Message

Raghu Rao

Monday 01 November 2010 4:02:57 pm

Hi there,

I have been asked to create a resource sharing system (the resource could be as simple as an article) for which i need to track the progress of the article. This involves who was the first creator, who the resource got shared with, weather the new user copied the resource etc etc. My main question is,

1. is it possible to create custom database tables in ezpublish

2. If its possible, how

Thanks in advance :-)

Cheers

RD

Jean-Luc Nguyen

Tuesday 09 November 2010 9:04:19 am

Hi,

Yes you can create and use custom tables in eZ Publish.
In a "classes" subdirectory, you will create your helloWorld PHP class for a hello_world table.
Your PHP class will extends eZ Publish "default used class", like:
class helloWorld extends eZPersistentObject
{
function definition() ...
}

http://www.acidre.com

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 05:59:55
Script start
Timing: Jan 31 2025 05:59:55
Module start 'layout'
Timing: Jan 31 2025 05:59:55
Module start 'content'
Timing: Jan 31 2025 05:59:55
Module end 'content'
Timing: Jan 31 2025 05:59:55
Script end

Main resources:

Total runtime0.0129 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.0046 588.1250151.2109
Module start 'layout' 0.00460.0018 739.335936.6406
Module start 'content' 0.00640.0054 775.976690.1250
Module end 'content' 0.01180.0011 866.101629.9766
Script end 0.0129  896.0781 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002116.5030140.0002
Check MTime0.00107.3775140.0001
Mysql Total
Database connection0.00075.277510.0007
Mysqli_queries0.001914.403130.0006
Looping result0.00000.070010.0000
Template Total0.00096.810.0009
Template load0.00064.765410.0006
Template processing0.00031.969210.0003
Override
Cache load0.00043.330410.0004
General
dbfile0.001914.644480.0002
String conversion0.00000.057140.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