Jump to content

Querying Database

Go to solution Solved by Miss_B,

Recommended Posts

  • Solution
10 minutes ago, Seth Jones said:

How do we query a database separate in an application?


For example, if an application has something called profileSongs, how would we query that and retrieve a table value in php? Any examples or documentation available?

What is it precisely that you want to do? 

Have a look at this link for quering/accessing the database.

To use tables to pull and display info from a database table, have a look at this link.

Hope it helps.

Link to comment
Share on other sites

I wanted to clarify my question.

My plugin uses the database table core_members, which is not allowed anymore. I needed to make it use a separate database table called profileSongs_song which holds the profile songs URL. I needed help with linking the database tables with the member ID. Any tips is appreciated.

    protected function _profileSongSet( \IPS\Helpers\CoverPhoto $song ) 
        $this->member->kuzi_song_path = isset( $song->file ) ? (string) $song->file : NULL;

So this line is what I need to change.

$this->member->kuzi_song_path = isset( $song->file ) ? (string) $song->file : NULL;

I have a database schema created in my application called profilesongs_song, with the profile song URL which the column name is songPath.

Edited by Seth Jones
Link to comment
Share on other sites

48 minutes ago, CoffeeCake said:

You would create a table for your application and include the memberID as one of the columns.

Do you need to join the core_members table for any reason?

No, I just need to store the memberID in the table, correct?



Edited by Seth Jones
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...