People who code: we want your input. Take the Survey

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
1
vote
1answer
161 views

How to query for users from a specific user group?

I want to list only the users with a group_id value of 10. Why doesn't the following query work? $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('a.id, a.name, a....
1
vote
2answers
127 views

Filtering product query with two sets of filters. (J2Store)

I have two disjointed sets of product filters, $special_filters and $other_filters. I'm trying to retrieve the products from the database which match any of the filters in $special_filters AND any of ...
1
vote
1answer
62 views

How to integrate my custom Administrator component with core Joomla database tables during install?

Background: I am starting to package up three associated custom Joomla extensions that I've developed. (This is directly associated with my previous JSE question, if you want more context.) The ...
1
vote
1answer
756 views

Installation page not shown due to MySql access denied and 500 server error

On Ubuntu 18.04.1 LTS, the installation page is not shown. Instead, I see a blank page with Error On MySql log I see this: Access denied for user ''@'localhost' (using password: NO) However I ...
1
vote
1answer
223 views

SQL Error when updating custom component in Joomla 3.9

I have a custom component and I want to add language filter to my extension. So in my sql update file I added the following two lines to Alter my tables. ALTER TABLE `#__contract_contracts` ADD `...
1
vote
1answer
163 views

How to construct a JOIN query with Joomla's query methods?

I'm really new to SQL queries but now stuck with this one. I need the first and last name of a user from table #__comprofiler where their cb_job_role = 'Team Leader' and their cb_service_name = [the ...
1
vote
2answers
917 views

Use one pdo connection across multiple modules?

I have multiple modules on the same page that are individually connecting to the same external database through pdo connections. The website is getting slower since I added more modules. My guess is ...
1
vote
1answer
78 views

Query gives a single value when two columns in SELECT clause

I do have a database connection earlier in the script. $db = JFactory::getDbo(); Here's the query code: $albumartistidquery = $db->getQuery(true); $albumartistidquery->select($db->...
1
vote
1answer
354 views

How to debug a 500 can't load error?

I have moved a website running joomla from my old VPS to my own server. The server is working fine, other sites are loading. However, this joomla site doesn't load. Please can someone explain what ...
1
vote
1answer
280 views

Retrieve article URL from phpMyAdmin

I am migrating a site from Joomla to WordPress. The migration tool didn't setup redirects for the old urls so I'm planning to write something to do them for me. I need a way to output all the current ...
1
vote
2answers
408 views

Select+Checkboxes fields = query a Database [closed]

I want to make a form which contains one select field (dates) and multiple checkbox fields (teams), so when I select a date or choose a team, automatically makes a query a database, filtering by the ...
1
vote
1answer
57 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 `...
1
vote
1answer
401 views

How to add column if not exists when installing a component?

I would like to know when installing a component over an existing one, if it's possible to add a new column if it doesn't exist. For e.g. inside install.mysql.utf8.sql, I shall have something like: ...
1
vote
1answer
204 views

Delete users from Joomla V2.5

I am having an outside contractor work on my joomla site, and want to protect the users and passwords. I cannot use the solution in this thread since I have too many users - Bulk user delete on joomla ...
1
vote
1answer
148 views

SQL Query Problem in Joomla 3.x

I'm quite new to SQL and PHP and tried two write an array into the database, but I couldn't figure it out so far I always get following Error: 1054 Unknown column 'Array' in 'field list' SQL=...
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 ...
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 ...
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: ...
1
vote
0answers
26 views

MySQL - Is a query with many results or several queries with one result more efficient? [duplicate]

I need to get category titles for which I am using the a model where $result returns all the data from the categories table, what I need is only the titles, that by making a loop to $result and a ...
1
vote
1answer
27 views

How to use Joomla's query building methods to generate a query containing joined subqueries?

I am trying to write a query using Joomla's query building methods, but I cannot manage to write the subquery into the query. Here is my desired raw sql with php variables: "SELECT track_type, ...
1
vote
0answers
32 views

Want to dynamically create users via database, how do I encrypt password?

I'm handling two websites a main one with a huge database and a secondary one, I want that when a user is created in the main one that it also creates it for the secondary one, I already connected the ...
1
vote
0answers
73 views

How to count total queries with limit for pagination in Joomla getDbo

I am trying to build an author page with the lists of your articles in com_contact (this option exists but it cannot paginate). I need it to be paginated. So I am creating arbitrarily without ...
1
vote
2answers
51 views

Trying to display mysql values properly in php

I am trying to display my commissions for each month. I want to display all 12 months with a total for each month. I've started with just January but this is as close as I have come to get to what I ...
1
vote
1answer
78 views

How to collect multi-row data from #__fields_values and assign specific aliases for each value in the result set?

I have the following (working) query to get name, username and the value of a custom field: // Get a db connection. $db = JFactory::getDbo(); // Create a new query object. $query = $db->getQuery(...
1
vote
1answer
193 views

Delete query and left join with JDatabaseQuery doesn't work

I'm trying to convert a delete query with left join to use JDatabaseQuery, but I am encountering an issue in the query. The query that I'm trying to convert and which works is the following : $db->...
1
vote
1answer
41 views

JCE convert unicode after save in my DB

I added 🔒 in the source code of JCE. JCE convert it to 🔒. The problem is after save in my database ist is a scratch characters 🔒. My question now is should I modyfy JCE (How?) or ...
1
vote
1answer
154 views

How to sort title of items with natural sort order?

When you have in a column a list of items such as: Title1 Title2 ... Title10 Title11 and you filter on Title (alphabetically), the output is like: Title1 Title10 Title11 Title2 I want it to sort ...
1
vote
2answers
383 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 ...
1
vote
2answers
144 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 ...
1
vote
2answers
2k views

MySQLi PHP Warning [closed]

I am getting the following errors (in this order) thousands of times in my error log: [08-Jun-2016 13:11:05 America/Detroit] PHP Warning: mysqli::stat(): Couldn't fetch mysqli in {...}/libraries/...
1
vote
1answer
636 views

MySQL Update query not working

This update query is not working and I've triple-checked the general syntax for the update queries in Joomla via the documentation..Here is the code from the controller-side: public function ...
1
vote
1answer
2k views

How to select a blank(dummy) column in a JDatabse UNION query

I have two queries that I am combining using a UNION statement. I know that I need both queries to get the same number and type of arguments to work. I have one query that only really needs three ...
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 ...
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 ...
0
votes
2answers
139 views

How to generate missing column data using a reformatted substring of another column?

Due to a process issue (i.e. client not following instructions) I have over 900 urls with missing aliases in a mosets tree table. If possible I would like to create an SQL query that will generate ...
0
votes
2answers
138 views

Display Entry when referencing 2 Tables

Ok this is building on what I was previously working on in my last post: <?php $db = JFactory::getDBO(); $db->setQuery("SELECT `profile_value` FROM #__user_profiles WHERE `user_id`='customer_id'...
0
votes
2answers
612 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 ...
0
votes
2answers
69 views

Removing links from articles in Joomla using MySQL query

Trying to use ChristoKiwi's https://stackoverflow.com/questions/19356897/removing-links-from-posts-in-wordpress-using-query/61652078#61652078 approach for deleting links in Joomla articles, but having ...
0
votes
1answer
608 views

Php-sql result in joomla displayed in question marks

I have a simple sql query, in a joomla php server, rs forms pro. The result contains Greek characters. However, the result is displayed in question marks. $sql = "SELECT `FieldValue` FROM `table` ...
0
votes
2answers
2k views

Multiple primary key defined error when installing Jomestate plugin

I have Joomla 3.8.5 stable version. The code I am tring to execute is: Pastebin SQL code (I am tring to install the JOMESTATE plugin) I get the following error: JInstaller: :Install: Error SQL ...
0
votes
1answer
668 views

Restore deleted user

I have a Joomla system (v3.8) which is running well. Unfortunately, however, one of our administrator user record has accidentally been deleted. I need to restore it because we're now getting errors ...
0
votes
1answer
50 views

Why my code doesn't work?

I am using the following code: $db = JFactory::getDBO(); $query = $db->getQuery(true); $query->select('name') ->from ('#__gruposlocales'); $query-> where('latitudX = ' . (int) $lat); $...
0
votes
1answer
27 views

How to get all the articles by only knowing half of the ID or Name?

I need to get an array of all the articles that have a fixed part in their ID or Name and then create a template based of them. For example: I'll create many articles that have in their ID "plants" ,...
0
votes
2answers
1k views

How to run delete sql query with multiple values in Joomla?

I would like to run a delete sql query with multiple values in it in my joomla site. But I am unable to do so. So I need your help on this. In controller.php page: function deleteFiles() { ...
0
votes
1answer
76 views

Hide a value or data on table

I'm using this Mshah frontend user manager extension. I have below table and I want to hide the "Registered" value from that column, is that possible? As you can see, the third column is a user group ...
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 ...
0
votes
1answer
31 views

How to conditionally add filters to my query of the rsform_submission_values table?

$FormId=23; $qustioan1=qka1; <form method="post" action="#"> <select name="state" onChange="irancitylist(this.value);"> <option ...
0
votes
1answer
76 views

How to write a DELETE query with WHERE conditions using JDatabaseQuery syntax?

I have a query which I am trying to convert to JDatabaseQuery syntax, but I'm not able to find the correct way. The query is the following: DELETE upt FROM #__mycomponent_user_posts AS upt WHERE upt....
0
votes
1answer
57 views

Joomla / PHPMyAdmin bug when “select” is in the value

This question was originally asked on StackExchange, and it was recommended by @mickmackusa that I ask it here. Background We recently changed over from one server to a brand new one. Old server: ...