https://antibiotiqueaugmentin.com/surdosage-augmentin-bebe/
× This is the optional Forum header for the Suggestion Box.

Bug when using Dollar Sign ($) in data fields

More
14 years 2 months ago #358

When I add columns containing dollar sign ($) data to my grid, the dollar sign ($) and the first two characters after the $ are omitted when the table is displayed in the article.

For example, if I store $150.00 in the database, 0.00 is what TableJX displays in the article table.

I've resorted, for now, to removing the dollar signs, and the data displays fine.

Any ideas why the dollar sign ($) causes missing characters?


TableJX - version 1.4
Joomla - version 1.5.15
My SQL- version 5.0.89

Please Log in or Create an account to join the conversation.

More
14 years 2 months ago #359

Hi,

I have tested this, please see www.toolsjx.com/demo#linkable

What is the data type for your column?

In my case I have created view from table where the price column is decimal data type (with 2 decimals), because mysql doesn't have money datatype like other DBs.

I've created view like this:

CREATE VIEW Products AS
SELECT ProductName, Concat('$', Format(Price, 2))
FROM Products

Best regards,
Viljem

Last edit: 14 years 2 months ago by user62.

Please Log in or Create an account to join the conversation.

More
14 years 2 months ago #365

Thanks Viljem for the quick reply and for the example.

The data type is Varchar for the column in question.

I created the view as you suggested and still have the same problem. The results of the new view can be seen here: ************************. Take a look at the second table, it's the view that I created. Row #1 contains data with the $ sign and is missing the first few characters. The rest of the rows contain no dollar sign and are display properly.

Here's an example of the problem:

If the data is: The cost is $5.00
TableJX displays: The cost is .00

If the data is: The cost is 5.00
TableJX displays: The cost is 5.00

Thanks again for the assist.

Mike

Last edit: 13 years 11 months ago by MikeD.

Please Log in or Create an account to join the conversation.

More
14 years 2 months ago #368

This problem is most likely caused by another content plugin you are using. Some plugins might eliminate dollar sign while processing article output. You can see here www.americabeststorage.com/index.php?option=com_grid&gid=2 that everything displays as it should if it isn't included in an article.

This is just a blind guess, but try what happens if you use \$.

And try also to put some text including dollar sign into an article and display it, just to see what happens.

Please Log in or Create an account to join the conversation.

More
14 years 2 months ago #370

Great!

Thanks Viljem. Using \$ works fine. I'm still not sure why the format's not right when displayed within an article, but the work around will suffice. Thanks again for the help.

Excellent product and support!

Please Log in or Create an account to join the conversation.

Moderators: tomaz
Time to create page: 0.172 seconds

Contact Us

Contact us on Discord

Contact us on Facebook