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
1
vote
2answers
2k views

How to fix Joomla site both frontend and backend shows error page (site down) after fix database?

I have Joomla 3.4.8 site (multilingual site) that shows this error on the front-end that said : **Fatal error:** Call to undefined method JLanguageMultilang::getSiteLangs() in **/mysite/public_html/...
1
vote
3answers
1k views

select data from several tables in one query - how to control JOIN?

I'm building on my question here: Build a query with JOIN, but filter and sort that joined table first Now the goal has become more complicated and I can't solve it. Here's the problem: I'm building ...
1
vote
1answer
236 views

Build a query with JOIN, but filter and sort that joined table first

I'm building a custom component in Joomla 3.x. I have two tables in my model: table persons id name 1 Peter 2 Paul 3 Mary table cars id personid make price 1 1 BMW 10,...
0
votes
1answer
105 views

Get HWD media share video thumbnail url from Joomla database

I have videos on my site component HWDmedia share. They haven't schema.org integration and trying add markup to videos. For videoobject have 4 types and i add 3 of them (name,description and date) but ...
3
votes
2answers
2k views

Adding Multiple Users in Joomla

How can to add multiple users in Joomla 3 without using an extension? Thank you! :)
2
votes
2answers
2k views

Preprocessing form data before saving to the database

I have a series of checkboxes on my form that together form an array when POST'ed. I want to save this data as a string instead (e.g., "##,##,##") before committing to the database. Here's what I ...
0
votes
1answer
157 views

How to view all the products with thumbnail pictures, prices, etc in Virtuemart 3.4.5?

trying to see the entire datebase of all the products with a thumbnail image as well as the quantity, price, etc of each product.VirtueMart 3.4.5 Does anyone know if it's possible? Thank you
3
votes
2answers
668 views

Joomla assets table ucm rows

Does anyone know what these rows are for? Is it safe to remove them? Since they seem to be mostly empty? Note: this is assets table!
3
votes
1answer
31 views

Is there a way to purge all content and maintain settings?

I need to purge huge amount of data from J but maintain settings / modules etc. I've tried to write cli tool to clean up tables using correct models, but it is taking too much time. Is there a simple ...
0
votes
2answers
308 views

Database error importing from localhost to live site?

I've been using Xampp for Mac and the latest version of Joomla. I uploaded the site/database to a live server a couple weeks ago for a developer to look at a problem I was having specifically with ...
5
votes
1answer
3k views

Query database for articles, filtering by tag

I can use this to get published articles from the database: function queryDatabase_Posts($select, $limit) { // Database connection and query object. $db = JFactory::getDbo(); $query = $db-...
0
votes
3answers
726 views

Count rows from multiple database tables

On a project of mine, I've recently moved from native PDO to the Joomla Database Framework package. Before, I prepared the following statement to count the number of rows from multiple tables (...
1
vote
1answer
44 views

Joomla expensive tag queries on homepage

I noticed insane amount of queries on homepage for XXX_contentitem_tag_map. I actually don't display tags on homepage, since I've 100 articles on homepage - selecting tags for each article slows ...
3
votes
2answers
565 views

Joomla Debug Console does not show Database Queries

My Joomla 3.4.4 website is not showing Database Queries in Joomla Debug Console at the site front-end but it can be seen at the Administrator back-end. Below is the screenshot at the front-end And ...
1
vote
2answers
221 views

Change administrator site language through phpmyadmin

I was trying to setup a multilingual joomla site, and Faroese wasn't an option so I asked this question: "Add Custom language to content language" but this didn't give the user the opportunity to ...
16
votes
6answers
25k views

How can I print out a Joomla query?

Suppose you have constructed a query with Joomla. // Get a db connection. $db = JFactory::getDbo(); // Create a new query object. $query = $db->getQuery(true); // Select all records from the ...
0
votes
1answer
134 views

How to copy article from database in joomla?

When i copy row of joomla_content in database, that article show in articles component in management but not showing it in feature page(home). except id all columns are similar with orginal article. ...
0
votes
1answer
365 views

Error when trying to fix database in Joomla! 3

I wanted to fix the database because I couldn't install some modules that I needed. So I went to Extension Manager -> Database, but when I clicked on Database, I got this Error appearing: SQL = ...
2
votes
2answers
75 views

Not well written script cause high resource consumption

Recently a server's admin sent a report about a Joomla site that is causing too much resource consumption. The report said : CAUSE OF HIGH RESOURCE CONSUMPTION: We have conducted a detailed ...
2
votes
4answers
792 views

Configuring a Joomla website using wamp on multiple computers

I am working with Joomla for the first time and I am having trouble configuring it. From the articles available from the internet, I followed the following steps to clone a Joomla website to various ...
0
votes
1answer
60 views

Defining database options for Joomla framework package

I'm using the Joomla Database Framework package for an internal project. To initiate a Database instance, I'm using the following: $db = Joomla\Database\DatabaseDriver::getInstance($options); The $...
5
votes
1answer
753 views

Joomla SQL drivers and prepared statements

Can you tell me if Joomla SQL drivers support prepared statements? As far as I understand, the MySQLi driver does not prepare SQL statements. But Joomla also supports MySQL PDO driver. Does this ...
2
votes
1answer
90 views

Why int(11) on database integer columns?

Really this queation is not important it is just for the sake of curiosity. Why some many columns in Joomla DB schema and other components use integer with size 11. Why size 11, an odd number, ...
0
votes
1answer
336 views

Need altering sql-query with group_concat and two inner joins [closed]

I have the following two tables: #__records: id name 1 Child1 2 Parent1 3 Parent2 4 Child2 5 Parent3 6 Child3 #__parents: id child parent 1 1 2 2 1 3 3 ...
1
vote
1answer
100 views

Joomla Extensions MySQL state column

I noticed that the last column state in the table #__extensions always has a value 0. Can you tell me what the purpose of this column is?
1
vote
1answer
357 views

Delete items of database via CLI

I would like to delete some items with state "trashed" via CLI. Is it possible to call the delete-method of JTable from CLI? Thanks for your help :-)
4
votes
3answers
3k views

How can I get the names of the columns in an object or table with Joomla's SQL?

With the existing output I have from a basic query, what would be the best way to get the names of the columns in the resultant output object without having to run an additional COLUMNS query on the ...
3
votes
2answers
442 views

A foreign key field not updating as NULL

I am having a field 'leavepack_id' in a table with the below table definition CREATE TABLE IF NOT EXISTS `#__position` ( `position_id` int(11) NOT NULL AUTO_INCREMENT, `leavepack_id` int(9) ...
0
votes
1answer
68 views

The best way of storing products and categories in own component

I'm creating my own shopping cart component and I can't choose what way of storing products and categories would be the best. There are the following few options: 1. A fully independent component ...
1
vote
2answers
310 views

Storing data in a single column of a table OR as the part of json

I'm creating my own component for storing products (shopping cart). The most of products usually have their prices and other attributes. What way of storing these attributes in the DB is easier and ...
3
votes
2answers
957 views

How to share table between 2 or more databases?

I have a Joomla! site and now I want to make some subdomains. But, I want that the users must be the same in both. Like, if a user logs on to the main site and then goes to the subdomain at the same ...
1
vote
2answers
1k views

Unable to insert form values in to database Joomla 3

I am creating a custom joomla module based on form submission but i am having some problems in inserting the values I have a html form which has certain fieldsets which pass values to mod_score.php ...
0
votes
2answers
627 views

How to update the latest row in MySQL table

The table #__virtuemart_order_histories stores the orders with their virtuemart_order_ids and every order has the records with their own virtuemart_order_history_ids. I need to update the latest ...
2
votes
4answers
2k views

How to retrieve data from the Joomla DB via jQuery.ajax without controller

I need to retrieve some data from #__virtuemart_order_histories in templates/active_tmpl/html/com_virtuemart/orders/details_history.php via jQuery.ajax. I know that I can do it with a new &task= ...
1
vote
1answer
408 views

Modified database layer to use Amazon RDS's read replicas and master in MySQL

I've been searching without success a plugin that might split Joomla's read queries to one endpoint and write queries to another endpoint. This would enable us to use Amazon RDS's read replicas (MySQL)...
0
votes
1answer
3k views

Is it possible to use MongoDb with Joomla?

I've seen some drivers on Github, they go back to 2012, is there more updated support for Mongodb? Is there a guide I can follow to install run Joomla on Mongodb? I'm considering using the latest ...
0
votes
1answer
1k views

Use different mysql table for users

I need to integrate a users table instead of the default Joomla _user table. The table pref_users has simple id/user/email/password fields (not hashed). Is there anyway I can make Joomla use it ...
3
votes
2answers
113 views

What is the proper use of the name tag in the manifest file?

In the latest J!3.4 when installing extension of type 'file' (or may be other types are affected also) there is a difference regarding what is going into element field of table _extensions. Some ...
2
votes
1answer
215 views

How to transfer user data from a VM1 to a VM3 website?

I am going to replace a VM1 website with a VM3 one. They have over 1500 users, so it would be very good to transfer them over to the newer site rather than making them all sign up again. Is it a case ...
1
vote
1answer
346 views

Where does Joomla stores the session handler setting?

I have recently changed the Session Handler setting in Joomla 1.5! from 'database' to 'none'. I am searching as to where does Joomla! stores this information in the DB. To be more precise, where does ...
0
votes
1answer
354 views

How to merge joomla tag using SQL query from phpMyadmin?

Since Joomla does not have a tag merging feature, I'm looking for a way to merge existing tags using SQL query in phpmyadmin. Old tag_id=1 New tag_id=2 This query works as long as all of the ...
2
votes
2answers
758 views

Change "Show page heading" param for every menu item

I've got a site with few hundreds menu items. I need to change one parameter in all of them. Right now in most of the pages "Show page heading" paremeter is set to "No". I need it to be set to "Use ...
0
votes
2answers
826 views

Select code not working in article Joomla 3

I need to display data in an article in tabular form. I am using sourcerer by NoNumber for adding the select code in the article: <?php defined('_JEXEC') OR die("Restricted access"); $user =&...
1
vote
1answer
162 views

J3.3 custom field type - saving

I'm trying to make my own field type and it works fine so far, but the values are not saved to the DB, where do I do that? I know there is a similar question but I'm not content with the answer. #...
0
votes
1answer
869 views

Joomla Component into Module

I just want to call a specific function in a component. From the RokGallery Component in: com_rokgallery\lib\RokGallery\Model\file.php there is a function called &createNew that I need in ...
1
vote
1answer
5k views

Set user as super user from db

Joomla 3.3.6 I have a user called 'Jo'. He is currently set as a Joomla 'Administrator' with front and back-end access. However I would like to now set him as a 'Super User'. How can I achieve this ...
2
votes
1answer
75 views

Select new / modified rows from table

Using standard Joomla database functions, what's the right way to select new / modified items from a table? I don't want to use created > DATE_SUB(NOW(), INTERVAL 1 DAY) OR modified > DATE_SUB(...
3
votes
2answers
51 views

Clean up a WIP site before launch

I've been working on my own template for work, and in the progress made different temporary articles, categories and menu names. For the launch I'd like to clean it up as much as possible, resetting ...
3
votes
3answers
1k views

Insert into database with ajax from a joomla 3 module

I have seen a lot of inquiries about ajax, but normally there are about retrieving data from database. I was wondering about how to insert data directly interacting inside a module. I have a module ...
2
votes
2answers
1k views

Joomla 2.5, how to use "HAVING" using Query Object

"SELECT *, ((ACOS(SIN($lat * PI() / 180) * SIN(latitude * PI() / 180) + COS(78 * PI() / 180) * COS(latitude * PI() / 180) * COS((87 - longitude) * PI() / 180)) * 180 / PI()) * 60 * 1.1515) AS distance ...