Insert article directly in database? Topic is solved
Moderator: ooffick
Forum rules
Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.
Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.
-
- Joomla! Apprentice
- Posts: 11
- Joined: Sat Jun 09, 2012 10:50 am
Insert article directly in database?
I'm programming small app that connect to joomla database and I want to put article directly in database. In which table(s) I should put article? I put in _content, but I don't see it in backend? I guess that I need to insert data in another table, but I don't know in which?
- AMurray
- Joomla! Exemplar
- Posts: 7823
- Joined: Sat Feb 13, 2010 7:35 am
- Location: Australia
Re: Insert article directly in database?
There's more than one table that makes up the article in Joomla.
https://docs.joomla.org/Tables/content explains it.
To me it's a foreign language, to a developer it makes sense.
https://docs.joomla.org/Tables/content explains it.
To me it's a foreign language, to a developer it makes sense.
Regards - A Murray
- ceford
- Joomla! Guru
- Posts: 971
- Joined: Mon Feb 24, 2014 10:38 pm
- Location: Edinburgh, Scotland
- Contact:
Re: Insert article directly in database?
I think you need to read through the code of getListQuery function in administrator/components/com_content/src/Model/ArticlesModel.php especially the joins to tables other than #__content. I think you need an entry in #__workflow_associations
You could also turn on debugging and look down the list of queries to find the one used to fetch the articles list. That should give you a clue to what you have not set.
You could also turn on debugging and look down the list of queries to find the one used to fetch the articles list. That should give you a clue to what you have not set.
-
- Joomla! Apprentice
- Posts: 11
- Joined: Sat Jun 09, 2012 10:50 am
Re: Insert article directly in database?
Thank you! According that documentation, only foreign key is asset_id, and according this url https://www.itoctopus.com/creating-new- ... sets-table it is not necessaryThere's more than one table that makes up the article in Joomla.
https://docs.joomla.org/Tables/content explains it.
To me it's a foreign language, to a developer it makes sense.
Thanks, I will try this....ceford wrote: ↑Wed Jul 06, 2022 7:43 amI think you need to read through the code of getListQuery function in administrator/components/com_content/src/Model/ArticlesModel.php especially the joins to tables other than #__content. I think you need an entry in #__workflow_associations
You could also turn on debugging and look down the list of queries to find the one used to fetch the articles list. That should give you a clue to what you have not set.
-
- Joomla! Virtuoso
- Posts: 4750
- Joined: Tue Aug 23, 2005 1:56 pm
- Location: South coast, UK
- Contact:
Re: Insert article directly in database?
I don't see that this link has any relevance to your original question?
Thank you! According that documentation, only foreign key is asset_id, and according this url https://www.itoctopus.com/creating-new- ... sets-table it is not necessary
Have a look at https://www.[youtube].com/watch?v=YCs6YD_H14c
Last edited by gws on Wed Jul 06, 2022 9:56 am, edited 1 time in total.
http://www.gadsolutions.biz Electrical services
http://www.electrical-testing-safety.co.uk Testing services
http://www.electrical-testing-safety.co.uk Testing services
- pe7er
- Joomla! Master
- Posts: 23791
- Joined: Thu Aug 18, 2005 8:55 pm
- Location: Nijmegen, Netherlands
- Contact:
Re: Insert article directly in database?
Create a new article in the back-end. You will see that new article in the Articles overview.
And #__workflow_associations will have a new record for that article.
To see the imported articles, you'll need to create records for those articles in #__workflow_associations as well.
Kind Regards,
Peter Martin, Global Moderator
https://db8.nl - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com
Peter Martin, Global Moderator
https://db8.nl - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com
- ceford
- Joomla! Guru
- Posts: 971
- Joined: Mon Feb 24, 2014 10:38 pm
- Location: Edinburgh, Scotland
- Contact:
Re: Insert article directly in database?
I watched this video and found it fascinating! I used to teach something on databases and normalisation so the content was familiar to me, except for the WP comparison. Those who need to persuade a boss to choose Joomla rather than WP should take a look.
-
- Joomla! Apprentice
- Posts: 11
- Joined: Sat Jun 09, 2012 10:50 am
Re: Insert article directly in database?
Thank you guys! It's need to add record to #__workflow_associations! 
