We’re rewarding the question askers & reputations are being recalculated! Read more.

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
0
votes
0answers
19 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 ...
1
vote
1answer
31 views

Transfer Custom Code to Module / Plugin / Component

Joomla 3.9.12 I've been using Sourcerer in order to place custom code throughout my site, it's working well so far. I've created a custom html module, within this I have added PHP, JS, HTML and CSS. ...
2
votes
1answer
30 views

Tips On How To Optimise A Joomla Site

Joomla 3.9.12 What's the most effective way of optimising a Joomla website? I'm not sure if my site is particularly large, details below; Files / folders 28GB Database 314MiB When I take a backup ...
1
vote
1answer
14 views

Custom Field Tag Style List

Joomla 3.9.11 I have created an SQL custom field for my joomla contacts called location, this allows me to assign a location to my contacts. The SQL simply selects location_name from a custom db ...
2
votes
1answer
81 views

Failed to Read Session Data After Renaming DB

Joomla 3.9.11 Working on localhost, today I decided to rename my database from dbtest to dbnew. I did this using HeidiSQL > rename db When I visit my site I now see the following error; Warning: ...
3
votes
1answer
80 views

How to separate database results into 2 columns?

I saw the examples of how to do the odd even way, but I want the order to flow from one whole column to the next and not alternating left to right for each alphabetical item. Can this be done? Here ...
1
vote
3answers
266 views

JFactory::getDbo() deprecated— what's the replacement?

I'm running Joomla 3.9.5 and I'm attempting to update my JFactory::getDbo() calls (which are deprecated) to the newer format using the container. However, I'm getting the following error: Call to ...
0
votes
3answers
636 views

Joomla 3.9.3 Articles: 500 Unknown column 'a.note' in 'field list'

I've updated to Joomla 3.9.3 and now when I open the articles pages, I get this error: 500 Unknown column 'a.note' in 'field list' I've tried to fix the database with the Joomla repair function, ...
0
votes
0answers
15 views

idx_XXX error after reimport from content table

I export only the xxx_content table from SQL with TRUNCATE. After reimport the table the follow error message comes: ALTER TABLE `XXX_content` ADD PRIMARY KEY (`id`), ADD KEY `idx_access` (`access`...
0
votes
1answer
25 views

Connect to two MySQL db's [duplicate]

I want to use a second database for the product data. Is it possible to connect to two database and using of JFactory::getDbo(); ?
0
votes
3answers
332 views

Can Joomla! read from a CSV file?

I'm building a Joomla! Website (currently running 3.9.0). It's a website of a Sports Club and we would like to add Live Score, Scoreboard and Last Result. The Sport Association told us the only two ...
1
vote
2answers
373 views

How to check if specific table names exist in a database?

All I want to do is check if a table exists or not and I can't figure it out. I've tried: for ($r = 0; $r < count($tableArray); $r++) { $db = JFactory::getDbo(); $query = $db->getQuery(...
1
vote
1answer
30 views

Joomla table DESCRIBE

I'm trying to DESCRIBE a table in joomla 3.x I want to get the column names and the associated details (type etc) into an array. I want to get Name Type Collation Attributes Null ...
2
votes
2answers
136 views

How to query certain rows from a table based on other associated rows in the same table?

I'm trying to query my jos_rsform_submission_values table for FieldValue data in rows with a FieldName of Container# which shares a SubmissionId with another row where the FieldValue is "Pending" and ...
3
votes
1answer
268 views

with insert on duplicate key update - updating multiple rows at once

With latest joomla version I try to achieve one query to the database and updating multiple rows at once. I want to make a query like this: INSERT INTO `tablename` (`id`,`date`) VALUES ('79','2018-...
1
vote
2answers
21 views

User Showing in User Manager but not Data base

Problem, users are showing in User MGR and they can login, but the users are not showing in the data base. I've created new database and reinstalled same issue, Tried creating a test user with the ...
0
votes
1answer
91 views

Can't login to Joomla! admin updating password in PHP MyAdmin doesn't work

I cannot log into the Joomla! admin. Updating the password in PHP My Admin does not work. It always says that my username and password do not match, the user does not exist or I have not been ...
1
vote
1answer
97 views

Why does the truncateTable() method create an empty string for a query and fail to delete rows?

I have the following code attempting to truncate a table. The Joomla documentation makes me believe this will work, but it does not. What am I missing? $db = JFactory::getDbo(); truncate_query = $db-&...
2
votes
1answer
488 views

Convert line breaks in php textarea

I have a kind of a guestbook on my page. It's just a common textarea like this: echo ' <textarea name="msg"></textarea>'; and then I use a form to send me to the backend on submit: $db =...
3
votes
2answers
439 views

Check if INSERT query was successful or failed because of a duplicate UNIQUE KEY

I have a db-table called league where the mail column is the unique id: |name |mail | |Bryan|bryan@hotmail.com | I have a frontend where users can sign up and then I have this for ...
1
vote
2answers
225 views

UPDATE query to add 1 to multiple columns

I have a website for my football team. I have some statistics and so on in there, for example how many games each player has played and so on. What I would like, is for me to write in the names of ...
2
votes
2answers
292 views

Trouble Connecting to External Database

Context: Joomla 3.8.5 MySQL Joomla database = berrien_dev External database = BMP PHP 5.6.33 I am attempting to access in a component I am writing an external database that sits in the same MySQL ...
1
vote
1answer
64 views

Joomla database tables have duplicates that start with bak_

I have a Joomla website, and somehow, the database shows duplicate entries for every table row. The duplicates all start with bak_. I assume it was caused by some sort of backup process, but this has ...
1
vote
2answers
104 views

Localize output of SQL query

I make a query directly on the database like this: SELECT title,id, DATE_FORMAT(publish_up, "%d %M %Y") AS 'GEORGE' FROM #__k2_items WHERE published=1 AND trash=0 AND created_by=[id] ORDER BY ...
0
votes
0answers
75 views

Custom Joomla plugin to catch specific database queries

Is it possible to make a plugin which will get triggered by specific database events in Joomla? I need to watch the $this->getTable() request in Joomla. For eg: $table = $this->getTable(); if (...
1
vote
2answers
61 views

Variables do not work in email form

I made a simple email form to send an attachment (image). All sender information is taken from the joomla database, the user selects from the dropdown list (populated from database) new name of image. ...
2
votes
1answer
33 views

How to edit the text string “Contact Form”

How to edit the text string "Contact Form". Client wants it to say Inquiries. People are using it to make booking which he would like to avoid. Thanks. http://chrisgarsidepodiatry.com.au/index.php/...
2
votes
2answers
744 views

I am trying to connect two database with one Joomla site

I have two joomla site with different database.And I want to share all data one site to Another site .For example when I register A user in one website then it's updated on second site database also....
1
vote
1answer
131 views

Why my custom query only returns one result?

$dbwsk = JFactory::getDBO(); $querywsk = "SELECT `title` FROM `#__content` WHERE 1"; $dbwsk->setQuery($querywsk); $rowswsk = $dbwsk->loadResult(); var_dump($rowswsk); I've been working and ...
0
votes
1answer
108 views

Error on upgrade of database

I manually upgraded a Joomla 3.3 to 3.4.8, but Extensions > Manage > Database showed: The Joomla! Core database tables have not been converted yet to UTF-8 Multibyte (utf8mb4). I clicked ...
3
votes
1answer
764 views

How can I increase the maximum length of article titles?

I need to create a few articles with very long titles, but it seems like Joomla has a maximum article title length of around 256. How can I increase this limit?
2
votes
2answers
240 views

Custom Component load data

I'm fairly new to Joomla and I'm taking over a project from a previous developer. In a custom component we are capturing user data in a form. Before the name and address is entered into the database ...
1
vote
1answer
318 views

Get user id from user form field type

I have a custom database table created with my component that has a user id linked by foreign key to #__usersand I have a form field type in Joomla 3.x mvc <field name="modified_user_id" type="...
2
votes
1answer
52 views

Overwrite the global database driver

JFactory has a getDbo method, but no setDbo. Why? It can be useful for unit-testing to be able to overwrite the global database driver. Any other way to do this? EDIT: $database is a public property ...
1
vote
2answers
508 views

Joomla 3.7 change value in database after form button press

I want to do something really simple, but have to use Joomla what makes it probably complicated because I have less experience in Joomla development. I have field with a value (a number) which is ...
2
votes
1answer
795 views

Access external database connection in function?

I have the following code in an article using Sourcerer and it works fine but I would like to move the connection section out of the function so that I only need to create it once for multiple ...
1
vote
1answer
438 views

Import Excel table rows as articles

I have a different products organized in Excel file. Every column means something - Title, Description, Weight, Price and so on. Can I import them in Joomla in such a way, that every row is a new ...
2
votes
1answer
720 views

custom table display - help turning static html to dynamic php

I am trying to modify the list view of my Joomla component to display my table's data in a more user-friendly fashion. It currently simply displays all data in a regular table with columns and rows, ...
1
vote
1answer
371 views

Migration from MySQL to MSSQL database

I've a Joomla 3.6 project which is built on mysql db. I want to know how can I migrate to mssql db? Maybe someone could do step by step guide and suggest some tool for migration?
2
votes
2answers
2k views

Joomla 3.x: Installation using MSSQL as Database

I tried to do some research, but couldn't find one. Maybe someone can help! I want to install Joomla 3.x using MS SQL server as DB. Right now, I only can choose Mysql. PHP version - 5.6 + WAMP! ...
3
votes
2answers
385 views

How to prevent Joomla from reporting database error information

I'm currently investigating SQL injection attack vectors in my application. Currently, Joomla is reporting database error output when returning a HTTP 500 error page. How do I prevent this? The ...
2
votes
1answer
97 views

Extension to edit multiple articles in a same pattern?

I am trying to fix an old joomla site so it can be responsive. In the articles, every image comes with style="width:1150px;height:650px", I need to replace all these occurrences with style="width:100%...
1
vote
1answer
65 views

Why joomla doesn't use relation views and foreign keys?

As it's obvious, joomla doesn't use relation views and foreign keys. It seems that everything is handling in the application level (not in the database). For example, a reference value can be deleted ...
2
votes
1answer
477 views

Select data from multiple tables and output results as json [closed]

I wrote this query for getting data from 3 different tables which has one similar column. The trouble is, it throws an error: 500 internal server error I need the output to be in the form of json,...
0
votes
2answers
209 views

Store data from URL in Joomla website database

I just came through a scenario regarding joomla website. The scenario is: Data in URL is passed to Joomla website and from the URL Joomla must store the data into the database. Is this possible in ...
0
votes
2answers
50 views

Database to multi-language website doesn't have user but log in possible with the user

I have a rather peculiar problem. The web-developer before me run away for some reason and we cannot get ahold of him for the admin password. Luckily we have access to the database according to some ...
1
vote
1answer
53 views

Mysql Error 1273 when moving DB from dev to live server

So, I recently updated to version 3.6.5. I initially tested the update on a test server before moving the update to my live server. The issue I'm running into is Mysql 1273 Error CREATE TABLE `...
2
votes
2answers
80 views

Database errors after moving remote db to localhost

I've recently run into a strange issue after upgrading to 3.6.5. I've been trying to resolve issues with a failed one-click-update to my live site. Thankfully, I had a pre-updated backup living on a ...
1
vote
2answers
3k views

Fix database after failed update

So, I recently had an issue with a failure with updating to Joomla 3.6.5. It looks like I was mostly able to recover from the error by manually updating, however there seem to be issues with the ...
3
votes
1answer
287 views

Delete all demo data

Many templates come with demonstration data that may be installed to show off the features of a template. Is there a simple method of deleting all this data or am I going to be forced to delete each ...