[SUGG] Different Database related things

Hi,

I think there are some things related to databases thath needs to be taken into important consideration.
[LIST=1]

  • No Table - No Connection: Should be very interesting to create apps without mandatory connection and/or table. On Blanks apps sometimes a connection is not needed, but you have to specify mandatory.
  • Database Macros: Database Macros should be improved. Right now is difficult to implement over SaaS and shared enviroments where you need to change data connection at runtime based on data on the user connected. Examples, sc_changeConnectionData(), sc_createConnection(), sc_makeConnectionPersistent()(*) [/LIST]
    • sc_changeConnectionData(Array(Data), connection): For example, allows to change IP, port, user, and so on of an existent connection.
      sc_createConnection(): Creates a new connection object at runtime.
      sc_makeConnectionPersistent(): Makes a connection object created with sc_createConnection() persistent.
      etc…
  • Hello,

    I will discuss your suggestion with our team.

    regards,
    Bernhard Bernsmann

    Absolutely, I agree with this need.

    I currently have 40 customers that are all running exactly the same code base. The only difference is which database they access. As a result, I have to have 40 unique websites on my server, with the connection different in each website. It is horrible when I make a change to the code and have to deploy to 40 places instead of one, not to mention how it plays hell with php’s apc cache - very inefficient. I would not mind having 40 connectors in a single production environment, but changing connection in each application is not feasible, with more than 100 applications in the system. Setting a persistent connector at login time is definately the answer.

    Regards,

    Dave

    Hello,

    We did some implementations, look!

    Tutorial - http://www.scriptcase.net/scriptcase-samples/tutoriais/systems/multiple_databases.php
    Example - http://www.scriptcase.net/scriptcase-samples/php-systems/multiple-connections/

    Impressive John. Wich versi?n will implement this? Regards.

    Hello,

    This macro is available in the current version. We still do not disclose in our changelog, because the documentation is not quite ready.
    However, you can learn a bit from this tutorial I sent earlier. We will soon be publishing in our documentation.

    [QUOTE=John L. Santos;27903]Hello,

    This macro is available in the current version. We still do not disclose in our changelog, because the documentation is not quite ready.
    However, you can learn a bit from this tutorial I sent earlier. We will soon be publishing in our documentation.[/QUOTE]

    I saw something in the blog too, this is very welcome. Some other things to consider: making macro’s more consistent. I.e. setting fieldproperties in grids should also work in forms. I know there are ways of controling the contents of IFrames by using some javascript but a macro like sc_redir_container would be welcome. Would be the same as sc_redir, but works on the selected container.