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
3 votes
1 answer
85 views

Is the following everything one should do to prevent SQL injection?

In order to sanitize the user input in an article insertion form (title and HTML content), here are the bits that I've included: Use of JInput: $jinput = JFactory::getApplication()->input; get ...
user avatar
0 votes
1 answer
69 views

How to return data from 2 tables to one table using a select field

My tables: dzialki +--------------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +--------------+-------------+------+---...
user avatar
0 votes
1 answer
52 views

Implement SELECT query with a LEFT JOIN in J4

I want to get data from two tables using a LEFT JOIN. My query works in my current PHP code, I just don't know how to implement it with query building methods in J4. Can anyone help? SQL: SELECT `...
user avatar
0 votes
0 answers
26 views

How to encrypt and decrypt User data in joomla

I am new to joomla, and working on joomla application which is currently running on production environment. Application contains 1000+ registered users. As per GDPR Policy, I have requirement for ...
user avatar
  • 1
2 votes
0 answers
27 views

MySQL Server has gone away with mysqli_connect to another LAMP Stack / TURNKEY Linux

I am trying to connect to another VM (192.168.16.27) from 192.168.16.28 to get Data out of the MariaDB Database (joomla). So my Code is: $link = mysqli_connect("192.168.16.27", "user&...
user avatar
  • 21
1 vote
1 answer
35 views

How to use Joomla for insert, delete, display and update data from mysql?

I'm just started to learn using Joomla and one of the things that I need to do is to build a form that can insert data and that data can be displayed to another Joomla page. I got a few comments from ...
user avatar
1 vote
1 answer
26 views

Joomla mysql query - group_contact

I have mysql query: // Get a db connection. $db = JFactory::getDbo(); // Create a new query object. $query = $db->getQuery(true); $formId = 21; $query = "select * from #...
user avatar
  • 73
0 votes
2 answers
62 views

Error: Failed to start application: Failed to start the session

I have hosted web application develop using joomla in ubuntu 20 and use mysql as database. one i hosted and viewed in the web browser it show me Error: Failed to start application: Failed to start the ...
user avatar
2 votes
1 answer
75 views

How to join custom fields data to users table without extra rows in result set

I have rudimentary knowledge of SQL (when it comes to anything but single tables) and am trying to come up with a query that will give me all the custom fields for my users. This query will give me ...
user avatar
0 votes
1 answer
52 views

How to create menu item in admin menu Joomla 4 in php+mysql in module, plugin?

How to create menu item in admin menu Joomla 4 in php? From plugin/module for Joomla4?
user avatar
1 vote
1 answer
29 views

PieChart For RSForm for PlotaLot based on a dropdown field

So I got this Pie Chart to display the Count of Voters vs Position and it's working fine. SELECT Position, COUNT(1) AS count FROM ( SELECT MAX(IF(FieldName = 'Position', FieldValue, NULL)) ...
user avatar
0 votes
1 answer
36 views

2014 Commands out of sync - MySql query J4

I've come across this error when performing some database queries in my J4 site model: $db->setQuery((string)$query); try { $rows = $db->loadObjectList(); } catch (...
user avatar
1 vote
1 answer
91 views

GROUP BY and ORDER BY from different tables of CB extension as outcome to a list

I am trying to figure out how to implement this. Table1 with subscriptions AS sub id, status, user_id, plan_id, parent_plan, parent_subscription Table5 users (Joomla) AS u id Table6 fields AS ue ...
user avatar
0 votes
1 answer
76 views

View only showing one row from sql result set

I am creating a component and trying to display a list within a model. The code I have shows the multiple arrays that should be on the list, but when I add echo inside the view table, I am only ...
user avatar
  • 35
1 vote
2 answers
58 views

Joomla 3.9 replace zero dates with null on save/checkin (mysql zero date deprecated)

So zero dates are deprecated in MySQL. J4 has replaced them with nulls.I am trying to update a J3 component to stop J setting zeros in the modified and checked_out_time fields. For modified I am using ...
user avatar
  • 51
1 vote
0 answers
37 views

Using sql field in custom component

I have a custom component, it allows admins to select a related content article from the #__content table using the following: <field name="relatedcontent" type="sql" default=&...
user avatar
  • 1,992
1 vote
1 answer
101 views

How can I get the names of the columns with their corresponding row values as a list to use in a field (select list) of a form in Joomla MySQL

My table '#__boats' is as follows: id category type AIG ALLIANZ LLOYDS 1 0 Motorboats 2 0 Sailingboats 3 0 Jet Ski ...
user avatar
0 votes
0 answers
94 views

How to display external SQL table using Joomla?

I am looking for good free extensions I could use to display SQL tables on my website. I have tried a couple but, they either don't work or ask for indexing which my tables don't have. https://joodb....
user avatar
  • 7
1 vote
2 answers
90 views

How to use SQL statements not supported by JDatabaseQuery

Recently, I have needed to use some SQL statements that are not supported by the JDatabaseQuery class, specifically REPLACE INTO and INSERT IGNORE. The only way that I am able to get something to ...
user avatar
  • 2,180
0 votes
2 answers
54 views

Run model function in view file to insert default value into sql

I am new to Joomla and received a half-done component. It is a mostly database-dependent component. The component consists of a SQL file that inserts all the data and is able to display it. I am ...
user avatar
1 vote
3 answers
165 views

Join #__content with #__fields_values then filter and sort using #__fields_values data

I wrote an override in Joomla 3.X and sorted the result from the DB using this query, which works: $query = "SELECT content.*, fieldvalues.* FROM #__content AS content, #...
user avatar
1 vote
0 answers
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 ...
user avatar
  • 167
2 votes
1 answer
55 views

using Ajax to save contents of html how to make safe

I am using com_Ajax to save the contents of my editor (front end of the website in a module) Ajax and passing the content of the editor all works fine. I am concerned about security. To get the data (...
user avatar
1 vote
1 answer
47 views

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

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, ...
user avatar
  • 11
1 vote
2 answers
115 views

How to show multidimensional data in my CanvasJS chart?

<?php $db->setQuery("SELECT MartabehName, COUNT(MartabehCode) FROM `#__dimteacher` GROUP BY MartabehName"); $countMartabehName = $db->loadObjectList(); foreach($countMartabehName ...
user avatar
  • 43
1 vote
0 answers
38 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 ...
user avatar
0 votes
1 answer
49 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 ...
user avatar
  • 43
2 votes
1 answer
350 views

How to add pagination in joomla custom php code?

Please help me to add pagination (getLimitBox) to my table result. I have for example 100 rows in my table and I want to show 10 page. <?php $formid=23; $db = JFactory::getDbo(); $query = $db->...
user avatar
  • 43
1 vote
1 answer
108 views

RSFORM combine 2 submission form results in one Plotalot view

After requesting help from local db-masters with no result, I would like to ask this question here. The output required is this for example: Shelter ClientID Year Month Fees Amount ...
user avatar
  • 47
0 votes
1 answer
43 views

Logged in users not logged into Kunena on second site

I have 2 sites, let's call them site1 and site2. They're setup as subdomains such as: site1.domain.com and site2.domain.com They're both running Joomla 3.9.24 and I have created a view on site2 ...
user avatar
  • 1,992
1 vote
0 answers
137 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 ...
user avatar
  • 167
1 vote
1 answer
76 views

JFactory query to select field value if mulitple conditions are met

I'm basically trying to create a Joomla JFactory query to COUNT and SELECT data if a particular field's value meets my criteria. In "myTable", I may have several records where Field4 may ...
user avatar
0 votes
1 answer
56 views

Joomla Dev site accepting only prod credentials and directing to Prod site after replicating the Prod db dump to Dev DB

I have exported the Joomla DB dump from Production application and imported the same production sql dump file to my development environment. Now when i launch the development site then it logs me in ...
user avatar
1 vote
2 answers
341 views

Selecting data from two tables and make a ranking in an HTML table

I want take the result from scheda_atleta table for every player and make an HTML table with the best result. I've two tables: first named: at +----+----------------+ | id | nome_e_cognome | +----+----...
user avatar
  • 13
1 vote
1 answer
171 views

loadAssocList() is not working properly when assigning a column name as the key parameter

I have a complex query like below. I want the p.ComponentId values to be the first level keys of the multidimensional result set array. However, it does not work as expected. In my case, when I don't ...
user avatar
1 vote
1 answer
31 views

Mysqli using AS clause not working

I have two tables that are joined. Both have an id column. $query ->select($db->quoteName(array( 'a.id', 'a.address_one', 'a.address_three', 'a.address_two', 'b.id AS myStuff', 'b.person_id' 'b....
user avatar
2 votes
1 answer
90 views

PlotALOT RSForm Query showing only one result

After being helped very well by Stack community and learning a bit I created a query to show the sum of payments per client. A client can pay multiple times. I would like to know the sum of payments ...
user avatar
  • 47
2 votes
2 answers
114 views

Deleting rows in two different tables

I'm trying to make function (task) and deleting rows in two tables. But I don't get this sql query working, I only got this error: 1064 - An error has occurred. You have an error in your SQL syntax; ...
user avatar
  • 23
2 votes
2 answers
181 views

How to apply aliases in SELECT clause when two columns from JOINed tables have the same name?

I am trying to build a gamelist, right now I'm struggling getting the detailed team information. #__game id team_home team_guest 1 1 2 2 2 3 #__team id ...
user avatar
  • 483
0 votes
2 answers
72 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 ...
user avatar
1 vote
1 answer
182 views

Charts/Graphs for RSFORM using mysql for VChart and/or PlotaLot

I am working for a homeless organisation in Capetown. We are using RSForms to register our clients (about 3500 per year). We have a sizable database, but it's very hard to create a dashboard. We are ...
user avatar
  • 47
2 votes
1 answer
59 views

Show article details from custom module

I am trying to develop a custom module where I have options to select 4 different Joomla articles. In my module XML file, I have the following: <field name="articleOne" type="sql" label="...
user avatar
  • 1,992
2 votes
2 answers
530 views

Linking JOOMLA! database to a flutter application

I created a Joomla website which has some forms to be filled. Is it possible to link this form to a database that a flutter mobile application I developed can retrieve data from? For example, the ...
user avatar
  • 31
1 vote
1 answer
55 views

Problem accessing database from front end of a component

I am currently working on a component which will display "events", stored in a database, on a map (filterable by location, category, date etc...). My first step is to display a simple report of the ...
user avatar
  • 13
0 votes
0 answers
67 views

Code works properly but shows data for all users

I am using the latest RS Form Pro with Joomla 3.9, Platform 13.1.0. My code is working properly (thank you guys!) But the data should be limited to each user. The user ID is is not in the table ...
user avatar
  • 13
1 vote
1 answer
38 views

How to match database values regardless of accents on letters?

With the following LIKE condition in my WHERE clause, I only get the exact match. . ' LIKE '. $db->quote($db->escape($artist)), 'AND') . When $artist is, for example Beyoncé, it only returns a ...
user avatar
  • 11
1 vote
2 answers
61 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 ...
user avatar
  • 13
0 votes
2 answers
135 views

Article content to load from mysql based on ID in url

On my old website built in PHP, I had a link on a page which picked an ID based on what line was clicked. <td width=124><a href="tp/package.php?ID=<?php echo $row[0];?>">...
user avatar
0 votes
0 answers
401 views

Joomla 3.9.13 - Error: Failed to start application

I just installed version 3.9 joomla in local using xampp. Once the installation was finished correctly I tried to navigate the site and the backend. After loading a few pages, this annoying error ...
user avatar
  • 223
1 vote
1 answer
83 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(...
user avatar
  • 13

1
2 3 4 5 6