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
0
votes
1answer
59 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 ...
1
vote
1answer
31 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 ...
1
vote
0answers
32 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=&...
1
vote
1answer
94 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 ...
0
votes
0answers
49 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....
1
vote
2answers
64 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 ...
0
votes
2answers
51 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 ...
1
vote
3answers
127 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, #...
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 ...
2
votes
1answer
40 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 (...
0
votes
0answers
35 views

1146 Error when creating custom table

I have created a secondary user table to store other information in the Joomla database. However, when I try to insert information into that table, I get this error. 1146 Table 'database.#__vvuser' ...
1
vote
1answer
35 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, ...
0
votes
0answers
8 views

K2 can't search number from Database table Field

I can contact his to K2 but they can't help me to much... My problem Drop-down Selection of K2, I created them. 5 Years Old 6 Years Old 7 Years Old 8 Years Old 9 Years Old If I search "5 Ye",...
1
vote
2answers
103 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 ...
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 ...
0
votes
1answer
36 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 ...
2
votes
1answer
157 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->...
1
vote
1answer
80 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 ...
0
votes
1answer
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 ...
1
vote
0answers
96 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
1answer
53 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 ...
0
votes
1answer
45 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 ...
1
vote
2answers
271 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 | +----+----...
1
vote
1answer
100 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 ...
1
vote
1answer
27 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....
2
votes
1answer
81 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 ...
2
votes
2answers
95 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; ...
2
votes
2answers
121 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 ...
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 ...
1
vote
1answer
159 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 ...
2
votes
1answer
57 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="...
2
votes
1answer
420 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 ...
1
vote
1answer
42 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 ...
0
votes
0answers
62 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 ...
1
vote
1answer
35 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 ...
1
vote
2answers
53 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 ...
0
votes
2answers
89 views

Jooma 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, wich picked an ID based on what line it was. <td width=124><a href="tp/package.php?ID=<?php echo $row[0];?>">Package</a>...
0
votes
0answers
361 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 ...
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(...
0
votes
1answer
69 views

Joomla 3 database query select with limit [duplicate]

How can I use this query with joomla 3 with limit to 3 SELECT * , (3956 * 2 * ASIN(SQRT( POWER(SIN(( $coorlat - latitude) * pi()/180 / 2), 2) +COS( $coorlat * pi()/180) * COS(latitude * pi()/180) * ...
1
vote
1answer
30 views

Custom Field Tag Style List

Joomla 3.9.11 I have created an SQL custom field for my joomla contacts called location, this allows me to assign a location to my contacts. The SQL simply selects location_name from a custom db ...
1
vote
1answer
85 views

Raw sql query returns multiple rows, but with Joomla methods only one row is returned

For some reason the query I put directly to DB works, but when set in Joomla syntax it is returning only 1 result, and there should be a lot more... Clear Mysql query: SELECT vmp....
1
vote
1answer
188 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....
0
votes
0answers
37 views

Joomla! extensions table is not unique

The Joomla! extensions table is not editable in PHPMyAdmin. I believe there are non-unique values there too, so it cannot have an index. This is wreaking havoc with my install, I can't add any new ...
1
vote
1answer
221 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->...
0
votes
1answer
85 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....
1
vote
1answer
42 views

JCE convert unicode after save in my DB

I added &#128274; 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
2answers
143 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 ...
3
votes
1answer
147 views

Issues to be aware of when calling `concatenate()`, `regexp()`, `rand()`, and `castAsChar()` in sql queries

I'm taking it upon myself to become aware of some of the lesser known/used query methods because I like toying with MySQL and I want to implement Joomla calls when possible/sensible -- because they ...
1
vote
1answer
64 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
2 3 4 5