Support » Plugin: Snippet Shortcodes » Database

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author YeKen

    (@aliakro)

    Can you give me an example of what you mean?

    Cheers!

    Thread Starter chelminski

    (@chelminski)

    In addition to WordPress, other services and applications also use the database. In some tables I have information, e.g. about the game account balance, recent activity on the game server, rank, number in the ranking, etc.

    I would like to be able to use this data on the website. The query would be sent to the local database that WordPress uses (or an external one if you are able to do so). I would like to be able to define according to which criteria I will search (username, email address, metadata, etc.), and what I want to receive.

    Example

    [sc database db=”Database name” tb=”Table name” cl=”Column search” ud=”User data (username, e-mail, role etc.)” Cr=”The value of which column to receive” error=”What to show if no data was found”]

    [SC database db=”wordpress_data” tb=”economy” ud=”user_display” Cr=”balance” error=”Log in!”]

    Plugin Author YeKen

    (@aliakro)

    Yes, this is something I could potentially add in a future release.

    Plugin Author YeKen

    (@aliakro)

    I might try a simple one first to see it works. In essence wrapping around WP’s DB function get_var() e.g.

    [sv slug=”sc-db-value-by-id” table=”users” column=”user_login” column-to-search=”id” key=”3″]

    Thread Starter chelminski

    (@chelminski)

    Sure: D
    If you need a tester, feel free to write

    Plugin Author YeKen

    (@aliakro)

    Have a look at 4.1 and the new shortcode outlined here:

    https://snippet-shortcodes.yeken.uk/shortcodes/sc-db-value-by-id.html

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.