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
31
votes
4answers
4k views

Method for creating a subquery using JDatabase

At http://docs.joomla.org/Selecting_data_using_JDatabase, there isn't a documented method for writing a subquery using JDatabase. https://gist.github.com/gunjanpatel/8663333 exemplifies one way of ...
3
votes
2answers
712 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 ...
11
votes
1answer
10k views

Can I use PostgreSQL with Joomla 3.3

Can I use PostgreSQL with Joomla a 3.3 production site (not for testing) and if so is there anything I should be aware of? I would appreciate some feedback from someone who has actual installed and ...
3
votes
2answers
973 views

How to save image in specified folder in joomla directory and save file name in db

I am working on a custom component, where at the backend interface - we want the admin user to be able to upload image and let that image directly save to a specified folder - /images/uploads/variants/...
6
votes
1answer
682 views

Database query where() value is a number

As we know, any values that are defined in a database query should always be escaped in Joomla using $db->quote($value). When defining numbers as a variable, one would normally use (int) to set ...
12
votes
6answers
17k 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 ...
5
votes
2answers
4k views

How to do SQL exception / error handling compatible with 2.5 and 3.x?

I was trying to develop Joomla 2.5 and 3 component. As many things deprecated between these two versions and the way to throw and catch database and other errors, I could not find ways yet to make ...
4
votes
5answers
5k views

MySQL error: Unknown storage engine 'InnoDB'

I have a couple of Joomla 3.3.6 websites, and suddenly this morning I started to get random error messages, like this: Error displaying the error page: Application Instantiation Error: Unknown ...
3
votes
2answers
941 views

Adding Multiple Users in Joomla

How can to add multiple users in Joomla 3 without using an extension? Thank you! :)
2
votes
2answers
619 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....
3
votes
1answer
696 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?
3
votes
2answers
358 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 ...
2
votes
2answers
2k views

How to save checkbox values in a table?

How can i insert data from a html form to a table in Joomla database. Sample code of the form: Name : <input type="textbox" name="username"> Selection1 : <input type="checkbox" name="choice1" ...
2
votes
1answer
123 views

Save multiple fields in DB

Please help advice. How to save multiple Fields in the database. I have a form with X number of fields. Fields added using JQuery <input type="text" value="" name="jform[phone]"> <input type=...
1
vote
2answers
186 views

Update multiple columns with plus 1

I have a website for my footballteam. I have some statistics and so on in there, fx how many games each player has played and so on. What I would like, is for me to write in the names of every player ...
1
vote
1answer
167 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,...
1
vote
2answers
2k 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 ...