Questions tagged [mysql]

MySQL is a database system used by many websites on the Internet. Joomla is based on PHP and MySQL.

Filter by
Sorted by
Tagged with
2
votes
2answers
371 views

How to combine several sets of 'ANDs' and 'ORs' in a complex WHERE query object?

I want to create a complex WHERE query that checks: If (condition1 = TRUE) AND (condition2 = TRUE) AND (condition3 = TRUE OR condition4 = TRUE) So the first two conditions MUST always be true and ...
1
vote
2answers
137 views

How to refactor my iterated sequence of queries?

I'm building a component which is about to be finalized, but there is a bit of code that I want to refactor. I think this code can be completed in one statement and I used more than 3 statements. $db ...
1
vote
1answer
75 views

Show Subsribed Kunena Threads based on logged in User ID

I am trying to show all subscribed Kunena threads based on the current logged in user. Kunena stores the subscribed threads in the '#__kunena_user_topics' table, I've written the following but it's ...
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)...
4
votes
2answers
1k views

Join an existing table with a generated table of dates and count rows for each date?

I would like to use this complex mysql query in my joomla model to generate a timeline and count entries within a specific date range. My SQL Query is: SELECT T.calendar, COUNT(DATE(M.date)) as ...
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 ...
1
vote
4answers
218 views

Joomla 2.5 slow after migraration to a dedicated VPS

Recently I migrated a joomla 2.5 site with K2 from a shared host to a dedicated web server with WHM/cPanel with 1 GB of RAM. I used migration procedure recommended by WHM and everything went fine. My ...
5
votes
2answers
1k views

Rapid Ajax calls causing some MySQL queries to be ignored

I am currently working on a Joomla website on a Unix server. There are no users connected at the moment because I'm the only one who can access it (so no heavy traffic). During testing, I proceed to ...
0
votes
1answer
74 views

SQL syntax error while creating a form in JForms - where to correct the SQL code?

We have a Joomla 1.5.9 website with JForms component and MariaDB of unknown version, but definitely corresponding to MySQL 5.x. I have administered it through GUI (both backend and frontend) for two ...
1
vote
1answer
131 views

Joomla 2.5 and Virtuemart 3 installation problems

I've tried installing Joomla 2.5 and Virtuemart 3 (full install download from Virtuemart's website) and I went through the installation process ok. However I've had a lot of errors come up and don't ...
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(...
1
vote
1answer
175 views

Joomla 3.x Access Control / user role [closed]

I'm using Fabrik 3.2 Form builder to build a shipment tracking system (like DHL) using Joomla 3.x. I have built the form & added some records. Now what I want is when a customer logs in using the ...
1
vote
1answer
1k views

Submit external data to RSForms MySQL table

I have a form on a non-Joomla website which has the following fields: Full Name Email Address Work In A Pub (Tick box) Supplier (Tick box) Over 18 I have the following code to send from the external ...
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 ...
4
votes
3answers
22k views

Joomla DB Insert, how to get last inserted id?

I have to insert my data into 2 different tables, in the first table I have the following query which works perfectly: $insertProjectUser = 'INSERT INTO #__pmanager_user (user_cms_id, user_email, ...
4
votes
4answers
8k views

Joomla update broken updates table

I have recently updated Joomla from v 3.2.3 to 3.3.6 but for some reason when I'm trying to install anything I'm now getting an error: 1146 Table 'dbname.ku42W_updates' doesn't exist SQL=SHOW ...
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 ...
1
vote
1answer
425 views

How can i get a categories tree view in alphabetical order without to lose the tree structure

I use for my component a categories table like the categories table from Joomla. So the structure has also the columns from the Joomla categories table: - Table jos_my_categories structure: id, ...
1
vote
1answer
1k views

I can load data from Joomla database and external database?

It is possible to join 2 databases at the same time in a single query? For example: I want to see how many users I have on my server and how many users I have on an external server, all in a single ...
2
votes
1answer
3k views

How can I retrieve data from MySQL table and insert it into QR code using PHP?

I have this PHP code that should retrieve data from a MySQL database and embed it into a a QR code: <?php include(JPATH_LIBRARIES . '/phpqrcode/qrlib.php'); $db = JFactory::getDbo(); ...
7
votes
2answers
2k views

Why doesn't Joomla use foreign keys in the core table structures?

I am developing a custom component and want to use a foreign key user_id referenced to #__users(id). I noticed that Joomla doesn't use any foreign key in its core tables for example in #__user_notes ...
3
votes
3answers
2k views

Do I need a database to install Joomla on localhost using XAMPP?

I downloaded Joomla to create a website, but before buying any domain/hosting service, I prefer to work locally. Then, I downloaded XAMPP and moved joomla's file to XAMPP's htdocs folder. From ...
2
votes
3answers
634 views

Can some form extension write to/populate with values from database?

I want to have a very basic form, basically just a couple text fields and a few checkboxes. Ideally this form would be able to save to a table somewhere with the userid/name of the user that filled ...
2
votes
1answer
89 views

How to improve the speed of a Joomla site launched at Server2Go

I created a website with Joomla 1.5 and i am using Server2Go as my local server and this site will be used for presentation purposes in a CD. So, this site is about to 500 MB with its database ...
6
votes
2answers
2k views

Sometimes it shows the error #1044

I've just installed Joomla! 3.3 but sometimes, when I want to change a parameter, it shows the next error: 1044 Access denied for user ''@'localhost' to database '*' SQL=LOCK TABLES h2ap7_assets ...
4
votes
2answers
3k views

Creating a module to search the database and display the results

I have got a table in the database called #__magazines, this holds data for magazines (date published, issue number etc..). I have created a Component, Plugin and Module which is for Joomla 3.x, I ...
1
vote
1answer
982 views

Database error, do i need to worry about it?

I am getting this error in my error_log file. Do I need to worry about it? Although, I am having broken image link problems and SEF problems on some pages. [06-Sep-2014 20:55:05 UTC] PHP Warning: ...
5
votes
1answer
630 views

K2 Add tag to article if the keyword is in the article title

This seems to be a bit out of my league and knowledge of MySQL. So if someone can help it would be much appreciated. I would like to do the following: Enter/define a keyword e.g. mercedes Find all K2 ...
2
votes
1answer
260 views

phpmyadmin: how to save changes made on multiple rows using “edit”

Using an "find and replace" chrome's app, I made some changes in the fulltext field of 300 joomla articles. I could save each row one by one using the "go" button under each row (cf picture) but is ...
3
votes
2answers
551 views

How to sort my query's results by publish_up value?

I have a .php script that retrieve fields from my database table and then displays them in a foreach loop (here are the relevant parts of the code): <?php $jquery1 = "SELECT `...
1
vote
2answers
238 views

Database query outputting twice

I have the following database query: $database = JFactory::getDBO(); $database->setQuery("SELECT items.headline, items.image, items.copy, items.source FROM ...
3
votes
1answer
111 views

Using variables from a database like source

I have a google sheet (no, the data does not need to permanently reside there.) Which contains data for T-Shirts of my design Name Source Thumbnail Commision ...
1
vote
2answers
1k views

Migrating Joomla site to local machine

I borked a Joomla site while trying to upgrade to Joomla 3. One of the extensions was not supported and I had to restore my backup, including the backup of the database. Unfortunately, it did not work ...
1
vote
1answer
68 views

How can I modify/control the HTML output of my Module?

I'm developing a Joomla 3.x.x module which connects through to a components table in the database. I have got the following code in the helper.php which outputs the variables successfully: public ...
5
votes
1answer
572 views

JDatabaseDriver->replacePrefix( ) Allowed memory size of … bytes exhausted

Reported via Issue Tracker Item #33711 When trying to insert a BLOB > 3MB in the database, the following error occurs: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to ...
1
vote
1answer
67 views

MySql User with Multiple DBs Advice

I have recently created a Joomla 3.3 website which consists of one user (all privileges) and one database on my shared hosting account. I'd now like to install Piwik analytics aswell on the same ...
3
votes
1answer
1k views

Deadlock on the sessions table

Infrequently, instead of my site loading I get a white screen of death with this error message: Deadlock found when trying to get lock; try restarting transaction SQL=INSERT INTO jom_session (...
8
votes
2answers
1k views

How do I know if the integrity of the asset table is good up or not?

1) I have migrated a lot of articles from Joomla 1.5 to joomla 3. Migration went on mostly fine. However, there are a couple of articles which do not get saved when I press the save button in article ...
1
vote
5answers
2k views

Joomla 3.3.0 very slow

I am running Joomla 3.3.0 on a VPS and it is extremely slow. In fact, it's the slowest I've ever seen Joomla load before (Can take upto 5 minutes to load the article editor!!). Any ideas what could ...
1
vote
1answer
2k views

Error loading module MySQL server has gone away

I am facing a serious issue with Joomla version 1.7. MySQL server has gone away I am using the shopping cart platform Virtuemart. When I placed an order, the order confirmation message page is ...
4
votes
3answers
5k views

How to get parent category title for Tag view

I want to get my current article's category and parent category link into my page. I get the category via the following code: $db = JFactory::getDbo(); $id = $item->core_catid; $db->setQuery("...
3
votes
4answers
913 views

How to retrieve unique values before a parenthesis in JFormFieldList Filter query?

I have a JHtml custom filter populated by a JFormField extended class. It is added in the view with the following code: JHtmlSidebar::addFilter( '- Select Height -', 'filter_height', ...
3
votes
2answers
699 views

Proper way to use MySQL fulltext search on a keyword string?

I have a keyword string on which I want to do full text searching. The current search query in the model is as follows: $jinput = JFactory::getApplication()->input; $keyword = $jinput->...
4
votes
1answer
968 views

Table marked as crashed and repair failed

My Joomla 1.5.16 website has started to display the error below. I don't think this is a hack, and I can't find any evidence in the logs of someone trying to get in or any changes to files that ...
8
votes
7answers
10k views

What to do when installation stuck on creating tables?

Upon installation of Joomla the process stops while creating tables. Some tables were created, but not all of them. So far this only happens with MySQL with Joomla 3.x. What should I do?
32
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 ...

1 2 3 4
5