https://antibiotiqueaugmentin.com/surdosage-augmentin-bebe/
× Welcome to the ToolsJX forum!


How to "display SQL view in Table JX"?

  • Michael
  • Michael's Avatar Topic Author
  • Visitor
  • Visitor
12 years 7 months ago #1259

Hi & my gratulations for a fine piece of software.

My issue has already been discussed twice in this forum (e.g. here ), but I do not understand the answer.

I have a SQL table that holds large numbers, e.g. "123400000000". I wish to display them in an article within a grid table. I want the numbers to be more readable via number formatting, so that the number would be displayed as "123.400.000.000".

From the support forum I have understood that is possible via creating a SQL view statement:So far so good. However, I do not understand your recommendation : "... display view..."

How do I display a SQL view in an J! article?

help much appreciated,
kind regards,
Michael

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

More
12 years 7 months ago #1274

Hi,

SQL view is an object in SQL database. You can create it by executing a CREATE VIEW command on your database. It is used to format, and combine data from multiple tables in one single table, which is not the real table since it just collects data from other tables. But other applications that connect to the database they threat table or view in the same way. So in case of Table JX a database view will show up on the list among with all other tables after it is created.

For more information about views please refer to mysql documentation.

dev.mysql.com/doc/refman/5.0/en/create-view.html

Regards,
Tomaž

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

  • Michael Z
  • Michael Z's Avatar Topic Author
  • Visitor
  • Visitor
12 years 7 months ago #1310

Hi Tomasz,
ah, that was the secret ingredient I needed. Thanks. Apologies for asking, but exactly that information did not show up anywhere in your documentation or in this forum...

Yes, it works fine for me now.

To all others who (like me) are not really familiar with MySQL databases and creating views and integrating them in Table JX, the following might be helpful:

Go to your phpmyadmin page;
open a SQL query window;
create a view using the CREATE VIEW syntax of MySQL;
(for starters, try something simple like "CREATE VIEW test AS SELECT * FROM oneofmydatabasetables;)
Save the view within the database and display it;
if it displays fine and without SQL syntax error within your database, go to your Table JX admin screen;
in "Connection", hit the "Check and list tables" button;
the new view "test" should display in the "Table Names in Database" dropdown list in the "Table Settings section";
select "test" from the dropdown list;
set up "test" in the Table JX admin screen like you would set up any other of the databases' tables to be displayed in a grid in an article.
That's all there is to "displaying SQL view in Table JX". Simple when u know how to do it...
cheers
Michael

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

More
12 years 7 months ago #1311

Michael Z wrote:
No apologies needed. This is what support is for...

Viele Grüße
Tomaž

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

Moderators: tomaz
Time to create page: 0.138 seconds

Contact Us

Contact us on Discord

Contact us on Facebook