Questions tagged [database]

A database is an organized collection of data typically used to model certain situations. Use this tag if you have questions about designing a database. If it is about a particular database management system, (e.g., MySQL), please use that tag instead.

Filter by
Sorted by
Tagged with
3 votes
0 answers
47 views

Joomla 4 Pre-Update Check Database Fail

I installed Joomla on my webhost (Siteground) using the one-click installer package. I'm currently on v4.3.2 Everything appears to be working as expected apart from the Joomla update option. It keeps ...
jonboy's user avatar
  • 3,593
2 votes
2 answers
64 views

Is insertObject sanitizing the inputs?

Let's suppose I want to insert a new record into a table. Let's suppose that the table is of the structure of mytable(id, my_text); So, for example, we are to insert a new record, I would like to ...
Lajos Arpad's user avatar
0 votes
1 answer
163 views

MySQL "LOAD DATA LOCAL INFILE" with database connection object in Joomla 4

In order to import large CSV files into a Joomla database table, I use the MySQL "LOAD DATA LOCAL INFILE" command as follows: $db = $this->getDbo(); $sql = "LOAD DATA LOCAL INFILE '&...
cappu's user avatar
  • 137
0 votes
2 answers
35 views

UNION Query with loadAssocList($key)

So here is a small example of the query I play around with: $db->setQuery('SELECT position, title FROM jos_modules UNION ( SELECT position, title FROM jos_modules )'); $data= $db->loadAssocList()...
maidan's user avatar
  • 383
1 vote
1 answer
109 views

Change database password?

I am trying to change the Joomla database password. I cannot figure it out. If I change the password in the database first, then Joomla is unable to use it, because it no longer has access to the ...
jo-erlend's user avatar
  • 113
3 votes
3 answers
297 views

Migrating custom module to Joomla 4

I have a Joomla 3.x module which calls the category name from the database and then shows this in the module position. It does this with: $db = &JFactory::getDBO(); $id = JRequest::...
RustyJoomla's user avatar
  • 2,076
1 vote
2 answers
91 views

loadObjectList() returns array indexed by empty string

Very simple query: $query = $db->getQuery(true) ->select('*') ->from('#__mail_templates') ->where('template_id = ' . $db->quote($this->getRowId())) ...
Olle Härstedt's user avatar
1 vote
1 answer
78 views

After joining two tables in phpMyAdmin how do I save the results as a dynamic table?

In order to query the exact featured status of an article in a blog override (i.e. currently featured, not pending or expired or not featured at all) I have created a query to join two tables and ...
Gillian's user avatar
  • 411
0 votes
0 answers
190 views

Connecting to an external database in Joomla 4 - further problem

I have seen the earlier question on this subject and tried the suggested code: $db = (new Joomla\Database\DatabaseFactory)->getDriver('mysqli', $options); but get an error: An error has occurred ...
johnonorvic's user avatar
0 votes
0 answers
23 views

How to know about errors when using Table class store method without using getError

I'm wondering how to find errors when a table class is used, inheriting from \Joomla\CMS\Table and using the store method? It appears that in Table, the store method traps errors in a try-catch ...
mbrampton's user avatar
  • 314
1 vote
0 answers
235 views

Tables and needed columns in Joomla 4

On the Page https://www.dionysopoulos.me/book/com-tables.html#com-tables-get-object I read: The table MUST have the following columns: parent_id. The primary key of the parent node. Provides ...
agi's user avatar
  • 303
1 vote
1 answer
43 views

Customizing 'Item Saved' message in custom component

I'm trying to find a way to customize the message displayed after a successful record has been saved in a custom component. Well not really the entire message, just the 'item' part. For instance if my ...
chavab_1's user avatar
  • 195
2 votes
1 answer
72 views

Strange Characters in Site Text

Joomla 4.2.5 PHP 8.0.26 I've just noticed there are strange characters appearing throughout my website text - such as ’s Some of my pages are created with SP Page Builder, others with the default ...
jonboy's user avatar
  • 3,593
1 vote
1 answer
691 views

Connecting to an external database in Joomla 4

Connecting to an external database in Joomla 3 is easy following this documentation and works like a charm. But JDatabaseDriver->getInstance method is deprecated in Joomla 4. What is the ...
Peli's user avatar
  • 103
1 vote
1 answer
130 views

How do I insert multiple records?

First, I took user_id, name, and email for the #__users table and joined with custom #__field_values lot, address, and phone. $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->...
andrew913's user avatar
4 votes
3 answers
388 views

Joomla 4 Smart Search: Extra database for indexing data

I'm just about to migrate my site from Joomla 3 to Joomla 4. It's a pretty big website with thousands of articles that leads to problems using the new Joomla smart search. The indexing of the articles ...
mib1980's user avatar
  • 81
0 votes
1 answer
35 views

I am new to Joomla and I'm trying to figure out if I need to install the software or if I can just log in online to make changes

I recently started a summer job and it requires some website management. The company that hired me already has their website through Joomla! and I am just trying to figure out if I need to download ...
Hailey Labelle's user avatar
0 votes
0 answers
189 views

An exception occurred while executing 'INSERT INTO

I am trying to sign up in a portal but I am getting the following error; "SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'password' cannot be null How do I solve this problem?
Daniel Kiptoo's user avatar
4 votes
1 answer
4k views

What is the difference between mysqli and mysqlnd php extensions?

I'm considering upgrading from PHP7.4 to PHP8.0 on a Joomla 3.10.8 installation. I was surprised to find that my hosting provider only offers mysqlnd as a PHP extension in PHP 8.0, but not mysqli. ...
Dionysus's user avatar
2 votes
1 answer
106 views

Joomla MEMORY tables cause an error in creating/editing articles

I am encountering an error with Joomla 4 that has never occurred to me in previous installations. When I try to create/edit an article, a category or to index contents in smart search, I get the ...
Nintendomi's user avatar
1 vote
1 answer
23 views

Omit previously imported articles by comparing existing articles aliases with generated aliases

I am needing to compare the generated articles aliases of items imported from an external news API against those that are already stored in the com_content database to ensure that duplicates are ...
Mike Hermary's user avatar
2 votes
0 answers
75 views

Transfer of the site, with change of the database (MySQL to MariaDB)

I built my website with Joomla4 and a MySQL8.0 database. Unfortunately, I need to transfer my site to a server using MariaDB10.4, which isn't compatible with MySQL8.0. I'm not a programmer and ...
Julie Baumer's user avatar
0 votes
0 answers
49 views

How to display value from a specific field in the db?

I want to display the com_tags tag title in a module while on the "Tagged Items" menu item page. My goal is for this code to display the title for the current tag. For example, when on ...
modernmagic's user avatar
2 votes
1 answer
81 views

Restoring with Akeeba to a new site on cpanel

I've backed up my Joomla site with Akeeba, and I'm using Akeeba Kickstart to put the site into a dev environment on a different server with its own cpanel. The dev server has its own database and ...
Tom N.'s user avatar
  • 31
0 votes
1 answer
76 views

Dynamic Form based on Signed in User

I am a total noob in coding. Back in engineering school we had some coding classes and I was good at it but I never really focused on that. I know some python and c# and that is about it. I have a ...
CeDe's user avatar
  • 1
1 vote
1 answer
344 views

JTable, new row doesn't get inserted with table->save method

I'm trying to insert a row with the table->save() method, but the method executes an UPDATE instead. There is no row available, so it needs to be inserted. Does anyone know how to get it inserted? ...
Kuubs's user avatar
  • 345
2 votes
1 answer
94 views

using Ajax to save contents of html how to make safe

I am using com_Ajax to save the contents of my editor (front end of the website in a module) Ajax and passing the content of the editor all works fine. I am concerned about security. To get the data (...
user1616338's user avatar
2 votes
2 answers
54 views

Get the template I'm currently editing

I'm developing a custom form field for my template and I need to know the name of this template from inside this form field. While otherwise I would do a setQuery to look for client_id=0 and home=&...
thednp's user avatar
  • 415
1 vote
1 answer
75 views

Joomla Select from DB AND / OR grouping

I did not found any guide on how to handle such queries in Joomla: I would like to select all items from db which are: Published AND (the publish up date is 0000-00-00 00:00:00 or smaller then datenow)...
Marco's user avatar
  • 583
4 votes
1 answer
204 views

Create a table observer

I am trying to create a table observer in a module. I am using the Table Advanced API guide in the Joomla documentation https://docs.joomla.org/Table_Advanced_API_Guide. When I use the code provided, ...
rancper's user avatar
  • 63
0 votes
1 answer
31 views

Component development, on installing an update, should/could J! ignore some database errors?

While developing a component the database can go through many changes. Updating the component then either goes through many schema update files, or causes problems. Re-applying a database change file (...
Markers's user avatar
  • 113
2 votes
0 answers
59 views

writing my own code to import users

I need to batch create lots of users and I have their emails and some profile details like phone number and address. This data is in a google sheet. I just need to generate usernames and set initial ...
shenkwen's user avatar
  • 1,379
1 vote
1 answer
85 views

Where does Joomla com_tags store the ordering data?

I want to dump tags by order from the #__tags database table, but there is no order column in the structure, though there is ordering capability in the tags component. I've viewed the relevant files ...
Nadal's user avatar
  • 188
2 votes
1 answer
51 views

Which files do i need to include to perform database query?

I am trying to practice Joomla database query. For learning purpose, I'd like to know in a blank PHP file under Joomla's root folder, which files do I need to include to be able to do $db = JFactory::...
shenkwen's user avatar
  • 1,379
0 votes
1 answer
100 views

How to install custom component sample data?

I have a custom component for Joomla. I understand how to install some data using the sql file of component. Now I want to add some data to the database tables in a separate package. I can't find any ...
TVBZ's user avatar
  • 213
0 votes
1 answer
31 views

Joomla DB where statement not works as expected

I don't understand the world right now. I try to make a simple query from the DB, but it fails with the message that the column is not known. I do not understand why Joomla! tries to see the value I ...
Marco's user avatar
  • 583
2 votes
3 answers
243 views

Cannot Connect To MSSQL Server

I am using php 7 and trying to connect to mssql server. I have this code: <?php $serverName = "server"; //serverName\instanceName $connectionInfo = array( "Database"=>"...
jamesMandatory's user avatar
2 votes
2 answers
99 views

Json encoding being escaped

I'm writing to the db (I'm automatically creating a module): $module = new stdClass(); $module->title = $moduleTitle; $module->note = ""; $module->content = ""; $module-&...
user1616338's user avatar
1 vote
1 answer
340 views

Where to find article page title in database?

When managing an article, there is a "Browser Page Title" field in article options tab. It's the last field in the tab, just below the "Read More Text". Why it's not in the publishing tab makes no ...
TVBZ's user avatar
  • 213
0 votes
2 answers
79 views

Does Joomla Host Value under Server Database setting needs a change after change in ip address

need help. My web hosting recently sent email that they will perform an infrastructure upgrade and migrate my Cloud account to a new server with the latest hardware in Google facility. They now ...
Ruchika's user avatar
  • 415
1 vote
1 answer
234 views

Charts/Graphs for RSFORM using mysql for VChart and/or PlotaLot

I am working for a homeless organisation in Capetown. We are using RSForms to register our clients (about 3500 per year). We have a sizable database, but it's very hard to create a dashboard. We are ...
Gart's user avatar
  • 47
1 vote
0 answers
139 views

Table data are not shown in the depended field - BreezingForms - Mariadb [closed]

I have 2 set of fields: Set A (Field1, Field2), and Set B (Field3, Field4). Field1 loads data from Mariadb tableA according to user selection and then loads the corresponding data from tableA to ...
GalanopD's user avatar
2 votes
2 answers
130 views

Query with INTERVAL won't work

I have the following query: $query->select('date') ->from('#__db_reports') ->where($db->quote('date < NOW() - INTERVAL 30 DAY')) $db->setQuery($...
Thiago Guimarães's user avatar
3 votes
2 answers
700 views

Linking JOOMLA! database to a flutter application

I created a Joomla website which has some forms to be filled. Is it possible to link this form to a database that a flutter mobile application I developed can retrieve data from? For example, the ...
zexa's user avatar
  • 41
0 votes
0 answers
36 views

Display a form and post it to dabase

I want to insert a form in a default.php file and post it to the database. How should it be done? By adding an XML form or creating a regular HTML form and posting it to the database through a ...
Thiago Guimarães's user avatar
1 vote
1 answer
122 views

Error saving an edit in a custom component `table_users` was not locked with LOCK TABLES

I'm getting an error when trying to save edits in my custom component. I have another edit.php that works well. I identified that the problem lies in the table file, specifically in the function ...
Thiago Guimarães's user avatar
0 votes
0 answers
41 views

Retrieve all fields using while in Joomla

I'm trying to retrieve data using while and it won't work. The page just keeps loading and ends up with a blank page; no errors or anything but, when i use foreach, it works. Any explanation? The ...
Thiago Guimarães's user avatar
2 votes
0 answers
54 views

Very slow initialization of Joomla when on remote database

Running Joomla 3.9.15. When I am using a remote database (still on the same local network though), I am facing massive slow downs on the "before preloadComponents" phase of Joomla init. The actual ...
pkExec's user avatar
  • 183
2 votes
2 answers
284 views

Unable to update NULL via updateObject

We got 2 tables where one table is parent and another table as a child with primary and foreign key reference. Assume table1 is the parent and table2 is the child as below. table1: id <- ...
Malaiselvan's user avatar
  • 2,721
1 vote
1 answer
211 views

How to update database module params

Could someone kindly help please? I'm creating a plugin and part of its job is to automatically add a 'Menu Class Suffix' to a chosen menu. I know it can be done manually from the advanced tab of ...
JJBW's user avatar
  • 43

1
2 3 4 5