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
2
votes
1answer
653 views

Correct ways to verify update query is successful under conditions

I was trying to find out correct ways to verify db update query is successful but some problems i am fetching. Even if update query($db->execute()) is not done/row does not exists.... but it ...
1
vote
1answer
291 views

MySQL SELECT query with LIMIT to show a maximum of 3 images

I want to show up to 3 images that are assigned to the logged in user in a database table. I have written the following MySQL query: $db = JFactory::getDBO(); //GET GALLEERY IMAGES $query ...
2
votes
1answer
207 views

Component SQL Updates Not Running

I have been troubleshooting this all morning and am stuck. Hoping someone can help. Using Joomla! 3.7.0. I have a component that contains a number of MySQL update files. These files have been working ...
0
votes
1answer
534 views

filter db by a single date - how to hack the standard calendar form field

I used component-creator.com to build a component. The component has a table with a date field and a frontend view which shows the contents of the table with a filter which can show the items between ...
3
votes
1answer
133 views

SQL syntax error when attempting to filter list view - how to build WHERE clause?

I built a Joomla component for a school using component-creator.com and now I am trying to modify the source files. My current view lists off all parents and students in my database, visible to all ...
2
votes
1answer
440 views

Where query in Joomla component - what file do I edit?

Okay, so I am completely new to Joomla and I am trying to edit the source files of a component I built using component-creator.com. I have a database which stores different data for multiple ...
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 ...
2
votes
1answer
545 views

JDatabase, SQL statement template

Is there a way to use a statement template, like by Hibernate HQL? SQLQuery sql=s.createSQLQuery("SELECT AVG(RATING) as r, COUNT(*) as c FROM RATINGS WHERE ADVENTURE_ID = ?"); sql.setParameter(0, ...
2
votes
1answer
937 views

Select data from multiple tables and output results as json [closed]

I wrote this query for getting data from 3 different tables which has one similar column. The trouble is, it throws an error: 500 internal server error I need the output to be in the form of json,...
0
votes
2answers
134 views

Custom Component - Copy / Archive record when values change

For a custom component, I want to incorporate a way of keeping track of changes made to records in specific tables. For example, when the mileage value of a car is changed, the record having the old ...
2
votes
2answers
2k views

Copy partial site content from old site to new site

I am trying to copy content from an old joomla instance to a new joomla instance. We archived the old site and created a completely new site with the same version of joomla both sites are at 3.6.4. ...
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 ...
3
votes
2answers
1k views

AJAX post not able to update database

How can I achieve a database insert using AJAX? I've created a module and I'm using AJAX post to insert a record into the database but seem to get a silent error and no database update; I know the ...
1
vote
1answer
328 views

Optimize Joomla SQL Query to store data in array and pass on array output to field

I have built 2 queries $id = JFactory::getApplication()->input->getIn('vid'); $db = JFactory::getDbo(); $db->setQuery("SELECT `email` FROM `#__usedcar_variants` WHERE `id`='$id' LIMIT 1"); $...
1
vote
1answer
2k views

Refreshing module/div on form submit [without page reload]

I have this simple search form inside a custom module. HTML FORM: <div id="search-form"> <form action="" method="post"> <input type="text" name="roll_no"> <input type="submit" ...
1
vote
1answer
344 views

Errors processing query result set: Undefined variable and Trying to get property of non-object

I already have a database table called "form"; I added a new field in same table. The problem is in the query select * from "form". While the old fields display, the new field doesn't. I have no ...
0
votes
3answers
83 views

Field value picked from wrong table due to same field name in different tables

This is a code am using. However facing an issue due to common id field in all tables Problem vid='.$row->id.' - in url The id field in the url is showing from #__usedcar_products table, while i ...
1
vote
3answers
796 views

PHP function with JDatabase queries

I have these two blocks of identical code in one of my PHP modules. The only difference between these two blocks is that in first block it is ... active = ' .$db->q('1')); and in the second block ...
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" ,...
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=...
0
votes
2answers
156 views

Accessing Jdatabase via JavaScript Or Passing PHP varibles to JavaScript

I want to use this SVG Pie Chart on my Joomla site but the problem is I need to access data from Jdatabase and feed it to its index.js $(function(){ $("#pieChart").drawPieChart([ { title: "Cash"...
2
votes
2answers
18 views

Jdatabase: Finding part of the string which doesn't match $X string

I use some mysql queries to retrieve data from a Jdatabase table as strings. Now I need to find the part of that string which doesn't match another string (which actually is a sub-string of the main ...
3
votes
2answers
1k views

Jdatabase : Counting number of elements in a comma separated field

I have a Jdatabasetable having a comma separated field. What would be the best way (according to Joomla coding standards) to count the number of elements separated by commas. Like in the case below : ...
3
votes
3answers
108 views

Jdatabase : Sorting two selections?

I have Jdatabase table having attendance data of all my students. EXAMPLE : I need to display the attendance of all roll numbers for class 3. The records having 3 in attended_no column were ...
4
votes
2answers
5k views

How to relate comma-separated ids from one table to the ids of another table?

I have a varchar(255) field in one of my Jdatabase tables containing values separated by commas. Precisely, it contains numbers separated by commas. I want to retrieve the individual values using a ...
0
votes
1answer
261 views

export user details from database via cron

Is there any way I can export user details from joomla database such as name, password, email address, and import them into owncloud database via a cronjob?
3
votes
1answer
80 views

How to tell what WAS the local time of an article?

Sorry if this was explained somewhere, but up to now - nothing found. So, I have an article published today, Aug.14th, at 11:11 local time. This means +3 hours from UTC. At MySQL table content I can ...
5
votes
1answer
294 views

Joomla 3.6 How to migrate data from repeatable to subform

The new field type subform does not retrieve old data repeatable, even fields have the same names. I created many posts with repeatable. The data are stored in extra fields of com_conent. attribs ...
3
votes
1answer
145 views

Using JDatabaseQuery::union() causes errors

I'm getting errors when using JDatabaseQuery::union() to create a database query. With Debug disabled I get this at the bottom of the page, presumably when trying to disconnect: Warning: mysqli::...
1
vote
4answers
16k views

The MySQL adapter mysqli is not available - how to resolve this issue?

My website www.EliteMaths.com.au has been active until early this week. When I tried to access it this morning I got the following error message: Error displaying the error page: Application ...
0
votes
1answer
97 views

How to sort a fabricated column in my view that I've stitched together with data from multiple columns?

I have a view that displays a list of data from a table (I'm targeting Joomla! 3.5+). However, I fabricated a column that stitches data together after some manipulation. I do this in the getItems() ...
2
votes
2answers
369 views

How to retrieve RSForm submission data grouped by SubmissionId?

I have a table with 3 columns: SubmissionId, FieldName and FieldValue. 1) SubmissionId keeps ID submission. 2) FieldName stores field name of a form. 3) FieldValue stores field value of form field. ...
3
votes
1answer
391 views

Front end DB error, back end works

I recently moved a Joomla site to a new server, and for some reason the front end only gives a DB error: 0 - Could not connect to MySQL. This is usually due to wrong DB connection details in ...
0
votes
1answer
142 views

Mysql syntax error in query to external using community builder autoaction

A couple of years ago, using joomla 2.5 and community builder with it's auto action plugin, I created a mysql script that registers a user on a secondary site after the user has registered on a ...
0
votes
1answer
466 views

Issue with upgrade to php7 and new mysql

I upgraded everything from nginx to php to mysql and everything is configured correctly seeing as i can install a fresh version of joomla, but my previous project is now showing a blank page, no ...
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/...
2
votes
2answers
116 views

porting data from mysql to another mysql database

Is there a way I can port data from one mysql database table and transfer it to another mysql database table. both of these mysql databases are joomla databases, and i would like to transfer ...
0
votes
2answers
135 views

Upgrade 2.5 to 3.5 SQL error

I've recently upgraded a test site on 2.5.8 to 3.5.1. Before the upgrade all components were updated or disabled if not useable in 3.5.1. From here I used the Joomla Upgrade to get it to the latest ...
0
votes
0answers
4k views

Error: Out of sort memory, consider increasing server sort buffer size

I have upgraded the joomla website to 3.5.1 and the module manager is showing error: Out of sort memory, consider increasing server sort buffer size SQL= SELECT a.id, a.title, a.note, a....
1
vote
2answers
3k views

What does 'lft' and 'rgt' do in #__menu table?

I was trying to manually add menu item to the database. See this question, when I notice these two fields in the #__menu table. It seems to me they are auto increasing by 2. For example, if the latest ...
2
votes
1answer
755 views

Joomla install database configuration not recognizing MySQL

I'm trying to get myself up and running with Joomla for the first time, I've installed the full LAMP stack and navigated to my joomla install by going to the local host in my browser 127.0.0.1/joomla. ...
1
vote
2answers
312 views

Quotes Displayed in Database Value

So any profile data filled in within a user profile for joomla is being saved with quotes around it in the database. Does anyone know how to remove the quotes? It seems to do it even as the default ...
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'...
1
vote
4answers
3k views

Display a Value from a Specific DB Field

I'm trying to figure out what I've got going on here thats not working - I'm using RsTicketsPro and I'm trying to pull a specific value from their custom fields section in the database. I reached out ...
2
votes
1answer
2k views

How to check whether a specific row exists in a JDatabase table?

What would be the best way to check whether a specific row exists already in a JDatabase table? Instead of INSERT INTO Command, I need to execute a UPDATE command if the row already exists. Help ...
3
votes
3answers
131 views

Is there a file that defines error messages?

I would like to catch some exceptions to inspect the error code and determine if I should re-throw it with a more user friendly message. This would probably be most beneficial with MySQL errors. Is ...
2
votes
1answer
57 views

How can I test Joomla performace

After searching a lot over the web, I found nothing about my issue. Its there any tool that can test my Joomla website/server performance?! I am searching for a tool that test the website how it will ...
2
votes
1answer
5k views

Run MySQL Query From Button Click

How can I run a MySQL query from the onclick event of an HTML button on my site? For example if my button is created like so, how could I use this to run a MySQL query titled AddInfo <p><...