Announcement

Collapse
No announcement yet.

How can i read out the database configuration

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How can i read out the database configuration

    I have written my own ajax-call. The called PHP script now requires access to the database. How can I read the database access? Where is this information stored?
    Best regards: - Peter -

    I use ScriptCase 8 (latest)

  • #2
    I'm not sure what you did. Did you create an ajax event? Then you can just apply php code in the event and use the scriptcase macros to access your database.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      In situations where ScriptCase has no Ajax event, do I need a separate call. For example, in the Menu App. If I need to consider several things before the app is called. Then I put an event with jQuery on the button and call my Ajax call. In my PHP script called I need to access the database. By that I do not want to create a separate (second) configuration file and maintain, I would like to read out the existing ScriptCase configuration. But I do not know how to do this.
      Best regards: - Peter -

      I use ScriptCase 8 (latest)

      Comment


      • #4
        Before the menu you can run code scripts. I run as example code_Autostart and code_SetEnvironment before the menu runs. And there also operate all SC functions ... My start app is code_Autostart. This runs code_SetEnviroment and this than my menu(s).
        Best regards: - Reinhard -

        I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

        Comment


        • #5
          Thank you Reinhard. But I need ajax-calls in many other situation, where scriptcase has no event.

          I have found the config (_lib/conf/prod.config.php) and have it decrypt like in scriptcase apps. Now I can use my own ajax-calls with database.
          But on local development environment the configurtion is found in other lib and in a local SQLite3-db.
          Best regards: - Peter -

          I use ScriptCase 8 (latest)

          Comment

          Working...
          X