Where does the "auto-format" come from?

Author Message

Roy Bøhmer

Wednesday 21 February 2007 4:47:57 pm

Hi,
I have made an extension that simply import a tab separated textfile into at database table - one row for each line. One of the fields a date.
Then I have a template operator that finds the row in the database where the field 'dateæ matches todays date, and ouputs a textfield from the same database row.

This is what the table could look like:

DATE                   TEXT2 - varchar(255)
-------------------------------------------------------------
2007-02-22            1 Krøn 29,3
2007-02-23            2 Krøn 30,9

But when it gets the data from the database it displays the text as 1. Krøn 29, 3. (Dot after the first number, space after the comma , )
When I view the data in phpmyadmin it's ok, so I don't think the import is wrong.

The code used to get data and display the wrong formattet text is as follows:

$db =& eZDB::instance();
$rows =& $db->arrayQuery( "SELECT * FROM sdadailyword WHERE date= '" . $date."'" );

$row = $rows[0];
eZDebug::writeError( $row['text2'] );

So, where does the dot and space come from?

Some info about system setup:
ezPublish 3.7.5
linux
php 4.4.4
mysql 5.0.18
db table: MyISAM latin1_swedish_ci

- Roy

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 11:27:30
Script start
Timing: Jan 18 2025 11:27:30
Module start 'layout'
Timing: Jan 18 2025 11:27:30
Module start 'content'
Timing: Jan 18 2025 11:27:31
Module end 'content'
Timing: Jan 18 2025 11:27:31
Script end

Main resources:

Total runtime0.9379 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 589.3672152.6250
Module start 'layout' 0.00530.0026 741.992239.4453
Module start 'content' 0.00790.9287 781.4375410.1484
Module end 'content' 0.93650.0013 1,191.58598.1563
Script end 0.9379  1,199.7422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3505160.0002
Check MTime0.00140.1484160.0001
Mysql Total
Database connection0.00080.087010.0008
Mysqli_queries0.897995.7278460.0195
Looping result0.00050.0535440.0000
Template Total0.905696.620.4528
Template load0.00190.205920.0010
Template processing0.903796.350320.4518
Template load and register function0.00020.022510.0002
states
state_id_array0.00090.098910.0009
state_identifier_array0.00130.142620.0007
Override
Cache load0.00160.1673200.0001
Sytem overhead
Fetch class attribute can translate value0.00050.050410.0005
Fetch class attribute name0.00060.065010.0006
XML
Image XML parsing0.00010.010610.0001
class_abstraction
Instantiating content class attribute0.00000.000510.0000
General
dbfile0.00060.0587100.0001
String conversion0.00000.000740.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
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs