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
|