Escaping SQL examples in an article

Author Message

Christopher von Nagy

Friday 14 November 2003 8:37:45 am

I have run into a problem trying to include example sql code in an article. If I include an example of the sql case function used to group a time field in postgresql into quarter hour segments in conjunction with the date_part function, the article text following the case function is duplicated and included HTML tags are dropped or split. We are using postgresql as a backend for the cms. I would include an example of the code, but I'm afraid the same problem would occur with forum text.

Any help or suggestions would be appreciated. Perhaps it is possible to escape sql examples in the text?

Thanks

Update, the problem occurs with the following code snippet:

WHEN date_part('minute', datetime) less than character 15 THEN '1'.

The code following the less than character is eaten by ezpublish and the mess starts, so I guess I need to know how to escape a less than or greater than character so they are not mistaken for HTML snippets by ezpublish.

Paul Forsyth

Friday 14 November 2003 9:51:40 am

Have you tried using the {literal} tag? Ez should ignore anything between {literal} {/literal}

Christopher von Nagy

Saturday 15 November 2003 4:31:18 pm

Using the {literal}{/literal} tag set worked well. Thank you.

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 16:01:24
Script start
Timing: Jan 18 2025 16:01:24
Module start 'layout'
Timing: Jan 18 2025 16:01:24
Module start 'content'
Timing: Jan 18 2025 16:01:25
Module end 'content'
Timing: Jan 18 2025 16:01:25
Script end

Main resources:

Total runtime0.6946 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.0058 589.0313152.6250
Module start 'layout' 0.00580.0040 741.656339.4609
Module start 'content' 0.00980.6833 781.1172465.8594
Module end 'content' 0.69310.0014 1,246.97668.1563
Script end 0.6945  1,255.1328 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4893160.0002
Check MTime0.00130.1935160.0001
Mysql Total
Database connection0.00060.092010.0006
Mysqli_queries0.652093.8752570.0114
Looping result0.00070.0964550.0000
Template Total0.661595.220.3308
Template load0.00220.320320.0011
Template processing0.659394.919020.3296
Template load and register function0.00020.024710.0002
states
state_id_array0.00070.104110.0007
state_identifier_array0.00180.254820.0009
Override
Cache load0.00180.2532130.0001
Sytem overhead
Fetch class attribute can translate value0.00060.084120.0003
Fetch class attribute name0.00320.458030.0011
XML
Image XML parsing0.00020.031820.0001
class_abstraction
Instantiating content class attribute0.00000.001830.0000
General
dbfile0.00110.1532100.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