Jahia Dev Forum > Jahia and MySQL

0 (0 Good)
0 (0 Bad)

Jahia and MySQL

by  deepti »  2011/10/17 08:31

Hi,

I am new to Jahia. Can someone please explain me how to integrate mysql with Jahia.

I have setup a tempate and made some pages. Now in one section of a page, I want to fetch some dta from mysql database.

Thanks in advance!

Deepti

  (deepti)

Number of messages  12
Registration date
0 (0 Good)
0 (0 Bad)

Re: Jahia and MySQL

by  glucazeau »  2011/10/20 18:45

hi Deepti,

did you install Jahia using a MySQL database already?

You're not supposed to fetch data from your database directly in your template, Jahia offers many components that will do that for you, like news list for example. What kind of data would you like to retrieve? If you give us more information about your project we can guide you and help you to pick the good module.

regards,

Guillaume

  • Re: Jahia and MySQL
    2011/10/20 18:45

    glucazeau <p> hi Deepti,</p> <p> did you install Jahia using a MySQL database already?</p> <p> You&#39;re not supposed to fetch data from your database directly in your template, Jahia offers many components that will do that for you, like news list for example. What kind of data would you like to retrieve? If you give us more information about your project we can guide you and help you to pick the good module.</p> <p> regards,</p> <p> Guillaume</p>

  • Number of messages  95
    Registration date Oct 20, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: Re: Jahia and MySQL

    by  deepti »  2011/10/21 03:24

    Hi Guillaume,

    Thanks for your reply!

    I am using Jahia to replace an old custom CMS because I found Jahia to be the perfect fit for our requirements. My requirement here is to fetch some rows of data from a custom database table. The table is in turn populated by another system, so I was wondering if there is a way to create a custom module that can get data from the table/tables

    Regards,

    Deepti

      (deepti)

    Number of messages  12
    Registration date

    by  shyrkov »  2011/10/24 11:52

    Hello Deepti,

    I think, you can create a new droppable component or a view JSP in Jahia, which will use, e.g. JSTL's sql taglibrary to access any DB data, you would like to display.

    You can either define a new DB datasource in the your Web application context or use directly the connection info in your template.

    See The sql library section or Easy database queries with JSTL SQL actions for more details.

    Kind regards

    Sergiy

  • 2011/10/24 11:52

    shyrkov <p> Hello Deepti,</p> <p> I think, you can create a new droppable component or a view JSP in Jahia, which will use, e.g. JSTL&#39;s sql taglibrary to access any DB data, you would like to display.</p> <p> You can either define a new DB datasource in the your Web application context or use directly the connection info in your template.</p> <p> See <a href="http://www.ibm.com/developerworks/java/library/j-jstl0520#N10436">The sql library</a> section or <a href="http://www.ibm.com/developerworks/library/j-jstlsql/">Easy database queries with JSTL SQL actions</a> for more details.</p> <p> Kind regards</p> <p> Sergiy</p>

  • Number of messages  407
    Registration date Oct 24, 2011
    0 (0 Good)
    0 (0 Bad)

    Jahia and MySQL

    by  deepti »  2011/10/25 06:45

    Thanks Sergiy! This is working now.

    Regards,

    Deepti

      (deepti)

    Number of messages  12
    Registration date
    0 (0 Good)
    0 (0 Bad)

    Re: Jahia and MySQL

    by  deepti »  2011/11/25 05:02

    Hi Sergiy,

    I had created some custom 15 modules in Jahia that get data from a custom database. When trying to publish pages built on these modules, jahia froze and I hit the Refresh key and subsequently everything stopped working. Now:

    1. when I click on edit mode, I get 404 error

    2. When I load my templates in studio, it shows "module error"

    Please help me out in this. I have been working on this for past 1.5 months and my entire work will be ruined if I do not get this resolved! :(

    Regards,

    Deepti

      (deepti)

    Number of messages  12
    Registration date
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page