Questions tagged [sql]

Structured Query Language (SQL) is a language for querying databases.

Filter by
Sorted by
Tagged with
0
votes
2answers
448 views

Joomla 3.4.8 Component SQL Update Not Working

As the title says I'm using joomla 3.4.8 I'm trying to customize the system component "com_content" what I want to do is to add an another columns on the '#__content" table in the database but the ...
0
votes
2answers
701 views

Get current language and DB Query to select content by language

I'm trying to select data from content table in Joomla (3.4) filtered by language field. When I pass a value, it doesn't change in the SQL statement Here is my code: public function articlesar() { ...
0
votes
1answer
89 views

Bulk delete disabled k2 users Joomla 2.5

I have thousands of spam users. I use K2 and I would want to delete them from "k2_users" and from "users". I want to delete the blocked ones. I have tried deleting K2_users from the admin, but it does ...
0
votes
2answers
110 views

Ordering Joomla menus in code

I am trying to order jos_menu items by the order in which they appear on the menu. In other words, I am using jdatabase sql queries to fetch menu objects then iterate through them to display them. I ...
0
votes
1answer
451 views

How to SET a user-defined MySQL variable and increment it to produce ranking values with JDatabaseQuery?

I'm trying to write this query: SET @rownumber = 0; UPDATE #__hikers SET rank = (@rownumber:=@rownumber+1) ORDER BY score DESC; like JDatabaseQuery, but still got an error. Please help UPDATE: I ...
0
votes
1answer
173 views

Join two list views without a shared key

I have a front end list view for a table called #_students and a separate front end list view for a table called #_sessions. The two tables have no shared foreign key and the two data sets are ...
0
votes
1answer
382 views

Error: Incorrect table definition; there can be only one auto column and it must be defined as a key

I am trying to install joomla 3.7.5. I am facing an Error message: Error: Incorrect table definition; there can be only one auto column and it must be defined as a key The table '#...
0
votes
1answer
537 views

Joomla 3x sql field NOT Filtering on Change

I am using Joomla 3x sql field to filter between two select fields.. The problem is that the second field does not filter as expected. It is just populated with all the result and when I select a ...
0
votes
1answer
217 views

Dynamic component SQL parameter type

I'm looking to add a Component field which will display a list of Joomla users who have a relationship with current the Component item. Below is some sample XML where by I would like [current ...
0
votes
1answer
342 views

Copy user data into custom table on user registration

upon creating a user in joomla i would need fields copied from jmla_users table to another jmla_new_users. jml_users - jmla_new_users with the following fields, (username,firstname,lastname,email) ...
0
votes
1answer
197 views

joomla 2.5 / K2 - SQL Query to delete trashed items taking care of data integrity

I have not a testing environment where put this to the test: delete from k2_items where trash = 1 Of course this will remove everything that is marked as trash, but is there any other table that has ...
0
votes
1answer
514 views

Update all rows primary key columnin a table - Joomla 3.4.8

I have a temp table created with a list of "master tasks". These need to be duplicated so they can be assigned to users as needed. The problem I have is the table column 'id' is a primary key set to ...
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 ...
0
votes
1answer
438 views

Joomla MVC Component: Run SQL before deleting record

I have a course listing component, and each course as zero, one, or more corresponding sections for that course. Basically different versions of that course that run at different times at different ...
0
votes
1answer
336 views

How to merge joomla tag using SQL query from phpMyadmin?

Since Joomla does not have a tag merging feature, I'm looking for a way to merge existing tags using SQL query in phpmyadmin. Old tag_id=1 New tag_id=2 This query works as long as all of the ...
0
votes
0answers
31 views

Use a Field value in a Query (Seblod Query plugin)

I'm using the Query plugin that lets me create a Query field on my List & Search. I have a hidden field with ID 'id_number' which I'm trying to use in my query. When I check the Page Source(Ctrl+...
0
votes
1answer
119 views

Use the “sql” form field type in extension xml only if the table exists

I developed a plugin for Joomla!, and I have the below sql parameter field in my sampleplugin.xml <field name="cb_fields" type="sql" label="Select CB fields" query="SELECT name ...
0
votes
2answers
109 views

Do I need a custom field for a db field alias?

When viewing an individual record, I'm using a calculated field from a sql query to display as a read only field in my form. However I'm unable to get it to display (no error, just blank). Curious, do ...
-1
votes
3answers
6k views

1054 Unknown column 'extra_query'

I have a new Joomla installation with this error: 1054 Unknown column 'extra_query' in 'field list' SQL=SELECT DISTINCT update_site_id, type, location, last_check_timestamp, extra_query FROM ...
-1
votes
1answer
56 views

add text after value that is retrieving from SQL in php [closed]

This is the code that i retrieve data from sql in this case ¨Km¨ is added before value but i will ¨Km¨ after value .. example : now is like this : Km 129.000 but i will 129.000 km $insert1 =" /// ...

1
2