Skip to Content Skip to Menu

Specific table in plugins

  • ecobansf
  • ecobansf
  • OFFLINE
  • Posts: 3
  • Thanks: 0
  • Karma: 0
17 years 7 months ago #34510 by ecobansf
Specific table in plugins was created by ecobansf
Hello,

I want to develop a CB plugin to complete user profile information in order to use them with my component.
It appears to me that the simplest way is to use a specific table to store these informations.
But there no information in API doc on how to use specific table. The only information is about the creation of the table.

But How to say that the field I want to create (via <fields> and <field> tags) has to be stored in this specific table.

Is someone already use specific table in a plugin?

Someone can help me, or tell me where I can find information about using specific table.

Thanks

Fab

Please Log in or Create an account to join the conversation.

  • ecobansf
  • ecobansf
  • OFFLINE
  • Posts: 3
  • Thanks: 0
  • Karma: 0
17 years 6 months ago #36458 by ecobansf
Replied by ecobansf on topic Re:Specific table in plugins
Nobody use specific table ?

I am looking for information about the use of that
please can someone help me?

Thanks

Please Log in or Create an account to join the conversation.

  • mikko
  • mikko
  • OFFLINE
  • Posts: 703
  • Thanks: 0
  • Karma: 115
17 years 6 months ago #36459 by mikko
Replied by mikko on topic Re:Specific table in plugins
The simplest way would be to have your component to read joomla tables.

If you want to write data to other tables, you can use the global database object. (see joomla docs for how to use the database object)

mikko

Post edited by: mikko, at: 2007/04/27 10:47

Please Log in or Create an account to join the conversation.

  • ecobansf
  • ecobansf
  • OFFLINE
  • Posts: 3
  • Thanks: 0
  • Karma: 0
17 years 6 months ago #36477 by ecobansf
Replied by ecobansf on topic Re:Specific table in plugins
So it means that there is no way to use CB API to write data in a specific table, is that correct?

My component will read the table, that's an other point.

I don't see how to use a mix of CB API (via fields tags...) and joomla API to write data.
Do you what I mean?

Thanks

Fab

Please Log in or Create an account to join the conversation.

  • mikko
  • mikko
  • OFFLINE
  • Posts: 703
  • Thanks: 0
  • Karma: 115
17 years 6 months ago #36479 by mikko
Replied by mikko on topic Re:Specific table in plugins
You need to do:

[code:1]
global $database;
$database->setQuery("INSERT fields VALUES values INTO yourtable"«»);
$database->query();
[/code:1]

You can do this in any code called from joomla.

Mikko

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum