charlesgodwin
Forum Replies Created
-
Peter;
I’ve thought about this and I think it’s best to leave it as it is.
I’m going to explore implementing the requirement by using the Search Builder and a separate “Advanced Search” page.
Peter;
I did a quick test and I see your point about the box size. That’s not good so I agree with your idea about one size fits all is good.But the UI is now a problem as I find when you select one, it fires off a search without pressing enter. Then when you <Ctrl> select another, it fires again and sometimes generates a SQL syntax error. And multiple selecting the implied “All” and a drop down value is illogical.
I think your suggestion is good but it will need some polishing before it’s implemented. I also presume it would be an optional setting.
Then there’s the question of what is displayed in the list box after a multiple selection has been made.
don’t put much effort into this while I think about the side effects.
Thanks, Charles
There is another approach you can take.
Use a generated column introduced in MySQL 5.7. These are columns know to the database and when defined as virtual, are only used for data retrieval and consume no space.
Here are some reference articles
https://dev.mysql.com/doc/refman/8.0/en/alter-table-generated-columns.html
https://www.mysqltutorial.org/mysql-generated-columns/add something like this to your schema
column4_a varchar(20) GENERATED ALWAYS as format(column4, 2) VIRTUAL
For more on the format function
https://www.w3schools.com/sql/func_mysql_format.aspBut, as Peter mentioned this will not provide a numeric sort.
Just guessing. D
Does it need the ending semi-colon? ‘;’Or… try WHERE YEAR(Period) = 2020;
UPDATE: YEAR() will only work if Period looks like a date.
- This reply was modified 3 years, 3 months ago by charlesgodwin.
- This reply was modified 3 years, 3 months ago by charlesgodwin.
I’ll work on it today.
Peter
Yes you explained yourself well and I understand the problem with insert / add. But… my question dealt with update / exit. I can reproduce the problem by just clicking on the edit icon of a row and after the edit popup is drawn , I just prerss save, making no changes. that is when I get the error.
I get the same problem. It was first reported by one of our team about December 10th.
When I load the manage table page I get this on the debug console
VM2478:3 Uncaught SyntaxError: Unexpected token '&' at b (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-tooltip,moxiejs,plupload&ver=5.8.2:2) at He (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-tooltip,moxiejs,plupload&ver=5.8.2:2) at s.fn.init.append (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-tooltip,moxiejs,plupload&ver=5.8.2:2) at s.fn.init.<anonymous> (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-tooltip,moxiejs,plupload&ver=5.8.2:2) at $ (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-tooltip,moxiejs,plupload&ver=5.8.2:2) at s.fn.init.html (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-tooltip,moxiejs,plupload&ver=5.8.2:2) at Object.<anonymous> (wpda_admin.js?ver=5.0.2:18) at c (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-tooltip,moxiejs,plupload&ver=5.8.2:2) at Object.fireWith [as resolveWith] (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-tooltip,moxiejs,plupload&ver=5.8.2:2) at l (load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-tooltip,moxiejs,plupload&ver=5.8.2:2)
When I press the export button I get this and the new page opens
admin.php?page=wpda:1 Uncaught ReferenceError: wpda_export_button_1 is not defined at HTMLAnchorElement.onclick (admin.php?page=wpda:1)
- This reply was modified 3 years, 3 months ago by charlesgodwin.
This problem seems to have gone away. I have no idea why as I wasn’t tracking it closely.
You can close the issue.
Thanks you
Forum: Plugins
In reply to: [WP Data Access – App, Table, Form and Chart Builder plugin] SQLYou could create a view of this SQL and then publish that. I do that all the time.
create view <view_name> as SELECT Player_Name, GROUP_CONCAT(Player_Break ORDER BY Player_Break DESC) FROM Player_Breaks GROUP BY Player_Name;
- This reply was modified 3 years, 3 months ago by charlesgodwin.
We believe we installed the patch. I’ll work on an example for you.
Peter
I slipped up and didn’t reply. I don’t think it did it. I just retested, once again, and its still not right.
Charles
We updated and I don’t see any change. What are we doing wrong?
This may not be a practical suggestion but our organization uses an Events plugin to manage events and calendars. you can customize each event page as its a WordPress Post.
select retailer_id, vendor_code, company_name,total_trans_count,total_revenue from view_name where ......
is valid syntax. I think there’s a way to do it in WPDA but I didn’t find it yet. hopefully someone can help with that part.The correcte code for a view you can use is
create view 'aggregated-data' as SELECT retailer_id, vendor_code, company_name, SUM(num_sales) AS total_trans_count, SUM(revenue) AS total_revenue, trans_date FROM vrpt_rev_daily_by_retailer_v1 GROUP BY retailer_id`
I can offer some help. The answer to 1) is to make a view.
create view 'aggregated-data' as SELECT retailer_id, vendor_code, company_name, SUM(num_sales) AS total_trans_count, SUM(revenue) AS total_revenue FROM vrpt_rev_daily_by_retailer_v1 GROUP BY retailer_id`
I’m not sure what to tell you about the second part about the where clause. But I think there’s a solution. I’ll check.